public class ReclosableLatch extends AbstractQueuedSynchronizer
AbstractQueuedSynchronizer.
This implementation allows you to create a latch with a default state (open or closed), and repeatedly open or close the latch.
AbstractQueuedSynchronizer.ConditionObject| Constructor and Description |
|---|
ReclosableLatch() |
ReclosableLatch(boolean defaultOpen) |
| Modifier and Type | Method and Description |
|---|---|
void |
await() |
boolean |
await(long time,
TimeUnit unit) |
void |
awaitUninterruptibly() |
void |
close() |
boolean |
isOpened() |
void |
open() |
String |
toString() |
int |
tryAcquireShared(int ignored) |
boolean |
tryReleaseShared(int state) |
acquire, acquireInterruptibly, acquireShared, acquireSharedInterruptibly, compareAndSetState, getExclusiveQueuedThreads, getFirstQueuedThread, getQueuedThreads, getQueueLength, getSharedQueuedThreads, getState, getWaitingThreads, getWaitQueueLength, hasContended, hasQueuedPredecessors, hasQueuedThreads, hasWaiters, isHeldExclusively, isQueued, owns, release, releaseShared, setState, tryAcquire, tryAcquireNanos, tryAcquireSharedNanos, tryReleasegetExclusiveOwnerThread, setExclusiveOwnerThreadpublic ReclosableLatch()
public ReclosableLatch(boolean defaultOpen)
public final int tryAcquireShared(int ignored)
tryAcquireShared in class AbstractQueuedSynchronizerpublic final boolean tryReleaseShared(int state)
tryReleaseShared in class AbstractQueuedSynchronizerpublic final void open()
public final void close()
public boolean isOpened()
public final void await()
throws InterruptedException
InterruptedExceptionpublic final void awaitUninterruptibly()
public final boolean await(long time,
TimeUnit unit)
throws InterruptedException
InterruptedExceptionpublic String toString()
toString in class AbstractQueuedSynchronizerCopyright © 2014–2018 The Redisson Project. All rights reserved.