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;
    } 
Stop searching for code, let great code find you!  Add Codota to your java IDE