Example usage for Java java.util.concurrent CountDownLatch fields, constructors, methods, implement or subclass
The text is from its open source code.
CountDownLatch(int count) Constructs a CountDownLatch initialized with the given count. |
void | await() Causes the current thread to wait until the latch has counted down to zero, unless the thread is Thread#interrupt interrupted . |
boolean | await(long timeout, TimeUnit unit) Causes the current thread to wait until the latch has counted down to zero, unless the thread is Thread#interrupt interrupted , or the specified waiting time elapses. |
void | countDown() Decrements the count of the latch, releasing all waiting threads if the count reaches zero. |
long | getCount() Returns the current count. |
String | toString() Returns a string identifying this latch, as well as its state. |