Code example for CountDownLatch

Methods: await

0
    /* (non-Javadoc) 
     * @see java.util.concurrent.Future#get() 
     */ 
    @Override 
    public V get() throws InterruptedException, ExecutionException { 
        this.latch.await();
        return result;
    } 
 
    /* (non-Javadoc) 
     * @see java.util.concurrent.Future#get(long, java.util.concurrent.TimeUnit) 
     */ 
    @Override 
    public V get(long timeout, TimeUnit unit) throws InterruptedException,
            ExecutionException, TimeoutException { 
        this.latch.await(timeout, unit);
        return result;
    } 
 
    public int getTransactionId() { 
        return transactionId;