protected boolean await ( final PoolWaitFuture < E > future , final PoolKey < K > key , Date deadline ) throws InterruptedException { try { waiting . add ( future ) ; return future . await ( deadline ) ; } finally { waiting . remove ( future ) ; } }
Adds the current PoolWaitFuture into the waiting list . The future will wait up until the specified deadline . If the future is woken up before the specified deadline then true is returned otherwise false . The future will always be removed from the wait list regardless of the outcome .