public class ReclosableLatch extends AbstractQueuedSynchronizer
AbstractQueuedSynchronizer while ThreadGate used to use explicit Lock
objects.AbstractQueuedSynchronizer.ConditionObject| Constructor and Description |
|---|
ReclosableLatch() |
ReclosableLatch(boolean defaultOpen) |
| Modifier and Type | Method and Description |
|---|---|
void |
await() |
boolean |
await(long time,
TimeUnit unit) |
void |
close() |
boolean |
isOpen() |
void |
open() |
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, toString, 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 final void await()
throws InterruptedException
InterruptedExceptionpublic final boolean await(long time,
TimeUnit unit)
throws InterruptedException
InterruptedExceptionpublic boolean isOpen()
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.