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, tryRelease
getExclusiveOwnerThread, setExclusiveOwnerThread
public ReclosableLatch()
public ReclosableLatch(boolean defaultOpen)
public final int tryAcquireShared(int ignored)
tryAcquireShared
in class AbstractQueuedSynchronizer
public final boolean tryReleaseShared(int state)
tryReleaseShared
in class AbstractQueuedSynchronizer
public final void open()
public final void close()
public final void await() throws InterruptedException
InterruptedException
public final boolean await(long time, TimeUnit unit) throws InterruptedException
InterruptedException
public boolean isOpen()
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.