Code example for CountDownLatch

Methods: countDown

0
    private String echoMessage;
 
    @Override 
    @Asynchronous 
    public void testDone() { 
        shutDownLatch.countDown();
    } 
 
    public static CountDownLatch getShutDownLatch() {
        return shutDownLatch;
    } 
 
    public String getEchoMessage() {
        try { 
            messageLatch.await();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        } 
        return echoMessage;
    } 
Contextual code suggestions in your IDE  Get Codota for Java