activemq-cpp-3.6.0
|
#include <src/main/decaf/util/concurrent/CountDownLatch.h>
Public Member Functions | |
CountDownLatch (int count) | |
Constructor. | |
virtual | ~CountDownLatch () |
virtual void | await () |
Causes the current thread to wait until the latch has counted down to zero, unless the thread is interrupted. | |
virtual bool | await (long long timeOut) |
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. | |
virtual bool | await (long long timeout, const TimeUnit &unit) |
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. | |
virtual void | countDown () |
Counts down the latch, releasing all waiting threads when the count hits zero. | |
virtual int | getCount () const |
Gets the current count. | |
virtual std::string | toString () const |
Returns the string representation of this latch, includes the current count value at the time of calling. |
decaf::util::concurrent::CountDownLatch::CountDownLatch | ( | int | count | ) |
Constructor.
count | - number to count down from. |
|
virtual |
|
virtual |
Causes the current thread to wait until the latch has counted down to zero, unless the thread is interrupted.
If the current count is zero then this method returns immediately.
If the current count is greater than zero then the current thread becomes disabled for thread scheduling purposes and lies dormant until one of two things happen:
If the current thread:
then InterruptedException is thrown and the current thread's interrupted status is cleared.
InterruptedException | - if the current thread is interrupted while waiting. |
Exception | - if any other error occurs. |
|
virtual |
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.
If the current count is zero then this method returns immediately with the value true.
If the current count is greater than zero then the current thread becomes disabled for thread scheduling purposes and lies dormant until one of three things happen:
If the count reaches zero then the method returns with the value true.
If the current thread:
then InterruptedException is thrown and the current thread's interrupted status is cleared.
If the specified waiting time elapses then the value false is returned. If the time is less than or equal to zero, the method will not wait at all.
timeout | - Time in milliseconds to wait for the count to reach zero. |
InterruptedException | - if the current thread is interrupted while waiting. |
Exception | - if any other error occurs. |
|
virtual |
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.
If the current count is zero then this method returns immediately with the value true.
If the current count is greater than zero then the current thread becomes disabled for thread scheduling purposes and lies dormant until one of three things happen:
If the count reaches zero then the method returns with the value true.
If the current thread:
then InterruptedException is thrown and the current thread's interrupted status is cleared.
If the specified waiting time elapses then the value false is returned. If the time is less than or equal to zero, the method will not wait at all.
timeout | - Time to wait for the count to reach zero. |
unit | - The units that the timeout specifies. |
InterruptedException | - if the current thread is interrupted while waiting. |
Exception | - if any other error occurs. |
|
virtual |
Counts down the latch, releasing all waiting threads when the count hits zero.
|
virtual |
Gets the current count.
|
virtual |
Returns the string representation of this latch, includes the current count value at the time of calling.