public void waitForIdToUnlock(final VaultID id,final long timeout){
  if (timeout <= 0) {
    throw new IllegalArgumentException("Must suppply positive timeout argument");
  }
  final long startTime=System.currentTimeMillis();
  long leftToWait=timeout;
  while (leftToWait > 0 && !isUnlocked(id)) {
synchronized (m_waitForLock) {
      if (isUnlocked(id)) {
        return;
      }
      try {
        m_waitForLock.wait(leftToWait);
      }
 catch (      final InterruptedException e) {
      }
      leftToWait=startTime + timeout - System.currentTimeMillis();
    }
  }
}

public void waitForIdToUnlock ( final VaultID id , final long timeout ) { if ( timeout <= 0 ) { throw new IllegalArgumentException ( "Must suppply positive timeout argument" ) ; } final long startTime = System . currentTimeMillis ( ) ; long leftToWait = timeout ; while ( leftToWait > 0 && ! isUnlocked ( id ) ) { synchronized ( m_waitForLock ) { if ( isUnlocked ( id ) ) { return ; } try { m_waitForLock . wait ( leftToWait ) ; } catch ( final InterruptedException e ) { } leftToWait = startTime + timeout - System . currentTimeMillis ( ) ; } } }
wait until the given id is unlocked
