| java.lang.Object org.apache.commons.transaction.util.RendezvousBarrier
RendezvousBarrier | public class RendezvousBarrier (Code) | | Simple barrier that blocks until all parties have either called or have arrived at the meeting point.
Very useful for testing or other purposes that require to make concurrent settings deterministic.
version: $Id: RendezvousBarrier.java 493628 2007-01-07 01:42:48Z joerg $ |
Method Summary | |
public synchronized void | call() Notify the barrier that you (the current thread) will not come to the meeting point. | public synchronized void | meet() Meet at this barrier. | public synchronized void | reset() Releases all waiting threads and resets the number of parties already arrived. |
DEFAULT_TIMEOUT | final public static int DEFAULT_TIMEOUT(Code) | | |
count | protected int count(Code) | | |
parties | final protected int parties(Code) | | |
timeout | protected long timeout(Code) | | |
call | public synchronized void call()(Code) | | Notify the barrier that you (the current thread) will not come to the meeting point.
Same thing as
RendezvousBarrier.meet() , but does not not let you wait.
|
meet | public synchronized void meet() throws InterruptedException(Code) | | Meet at this barrier. The current thread will either block when there are missing parties for this barrier
or it is the last one to complete this meeting and the barrier will release its block.
In this case all other waiting threads will be notified.
throws: InterruptedException - if the current thread is interrupted while waiting |
reset | public synchronized void reset()(Code) | | Releases all waiting threads and resets the number of parties already arrived.
|
|
|