API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util.concurrent. CountDownLatch View Source
Author(s)
Doug Lea
Since
1.5
Version
Serial
Hierarchy
 Object
      CountDownLatch
Implements
Subclasses
Description
public class CountDownLatch
  A synchronization aid that allows one or more threads to wait until a set of operations being performed in other threads completes.
See also:   
Constructors
public CountDownLatch (int count)
  Constructs a CountDownLatch initialized with the given count.
Methods
Hide/Show inherited methods
public void await () throws InterruptedException
  Causes the current thread to wait until the latch has counted down to zero, unless the thread is interrupted.
public boolean await (long timeout, TimeUnit unit) throws InterruptedException
  Causes the current thread to wait until the latch has counted down to zero, unless the thread is interrupted, or the specified waiting time elapses.
public void countDown ()
  Decrements the count of the latch, releasing all waiting threads if the count reaches zero.
public long getCount ()
  Returns the current count.
public String toString ()
  Returns a string identifying this latch, as well as its state.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar