Java java.util.concurrent CountDownLatch fields, constructors, methods, implement or subclass

Example usage for Java java.util.concurrent CountDownLatch fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util.concurrent CountDownLatch.

The text is from its open source code.

Subclass

java.util.concurrent.CountDownLatch has subclasses.
Click this link to see all its subclasses.

Constructor

CountDownLatch(int count)
Constructs a CountDownLatch initialized with the given count.

Method

voidawait()
Causes the current thread to wait until the latch has counted down to zero, unless the thread is Thread#interrupt interrupted .
booleanawait(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.
voidcountDown()
Decrements the count of the latch, releasing all waiting threads if the count reaches zero.
longgetCount()
Returns the current count.
StringtoString()
Returns a string identifying this latch, as well as its state.