org.linkedin.util-core/src/main/java/org/linkedin/util/concurrent/ConcurrentUtils.java
public static void awaitUntil(Object lock, long endTime)
    throws InterruptedException, TimeoutException
  {
    awaitUntil(SystemClock.INSTANCE, lock, endTime);
  }
public static void awaitUntil(Object lock, long endTime)
    throws InterruptedException, TimeoutException
  {
    awaitUntil(SystemClock.INSTANCE, lock, endTime);
  }
public static void awaitUntil ( Object lock , long endTime ) throws InterruptedException , TimeoutException { awaitUntil ( SystemClock . INSTANCE , lock , endTime ) ; }
Waits on the lock but if end time is expired then throws an
exception. On purpose this method does not synchronize on the lock
because it must be called from a block which synchronizes on it

@param lock the lock to wait on
@param endTime the time after which an exception is thrown (compared
to {@link java.lang.System#currentTimeMillis()}. If &lt; 0 then wait
indefinitely (so <code>TimeOutException</code> will not be thrown!)
@throws InterruptedException if the thread is interrupted while waiting
@throws TimeoutException if the time has been reached
Waits on the lock but if end time is expired then throws an exception . On purpose this method does not synchronize on the lock because it must be called from a block which synchronizes on it