Code example for CountDownLatch

Methods: countDowngetCount

0
    } 
     
    public void onChipsterMessage(ChipsterMessage message) {
    	 
    	// do nothing if already got one reply 
    	if (latch.getCount() == 0) {
    		return; 
    	} 
    	 
    	SourceMessage sourceMessage = (SourceMessage) message;
        this.source = sourceMessage.getSource();
        latch.countDown();
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE