public interface DistributedCyclicBarrier extends SyncPrimitive
DEFAULT_OPERATION_TIMEOUT_MILLIS| Modifier and Type | Method and Description |
|---|---|
AsyncDistributedCyclicBarrier |
async()
Returns the underlying asynchronous primitive.
|
int |
await()
Waits until all parties have invoked await on this barrier.
|
int |
await(Duration timeout)
Waits until all parties have invoked await on this barrier.
|
int |
getNumberWaiting()
Returns the number of parties currently waiting at the barrier.
|
int |
getParties()
Returns the number of parties required to trip this barrier.
|
boolean |
isBroken()
Returns whether this barrier is in a broken state.
|
void |
reset()
Resets the barrier to its initial state.
|
close, deleteaddStateChangeListener, name, protocol, removeStateChangeListener, typeint await()
getParties() - 1 indicates the first to
arrive and zero indicates the last to arriveint await(Duration timeout)
timeout - the time to wait for the barriergetParties() - 1 indicates the first to
arrive and zero indicates the last to arriveint getNumberWaiting()
int getParties()
boolean isBroken()
void reset()
AsyncDistributedCyclicBarrier async()
SyncPrimitiveasync in interface SyncPrimitiveCopyright © 2013–2018. All rights reserved.