/** @throws InterruptedException */ public void await() throws InterruptedException { for (; ; ) { stopper.checkCancelInProgress(null); if (latch.await(RETRY_TIME, TimeUnit.MILLISECONDS)) { break; } } }
/** * @param msTimeout how long to wait in milliseconds * @return true if it was unlatched * @throws InterruptedException */ public boolean await(long msTimeout) throws InterruptedException { stopper.checkCancelInProgress(null); return latch.await(msTimeout, TimeUnit.MILLISECONDS); }