Code example for Condition

Methods: await

0
    } 
 
    public void await(long timeout) throws InterruptedException { 
        try { 
            reentrantLock.lock(); 
            loadDataFromNetworkHasBeenExecuted.await(timeout, 
                TimeUnit.MILLISECONDS); 
        } finally { 
            reentrantLock.unlock(); 
        } 
    } 
 
}