Package com.sun.common.util.logging
Class BooleanLatch
- java.lang.Object
-
- java.util.concurrent.locks.AbstractOwnableSynchronizer
-
- java.util.concurrent.locks.AbstractQueuedSynchronizer
-
- com.sun.common.util.logging.BooleanLatch
-
- All Implemented Interfaces:
Serializable
public class BooleanLatch extends AbstractQueuedSynchronizer
Acts like a CountDownLatch except that it only requires a single signal to fire. Because a latch is non-exclusive, it uses the shared acquire and release methods.- Author:
- Jerome Dochez
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer
AbstractQueuedSynchronizer.ConditionObject
-
-
Constructor Summary
Constructors Constructor Description BooleanLatch()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isSignalled()
int
tryAcquireShared(int ignore)
boolean
tryReleaseShared(int ignore)
-
Methods inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer
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
-
Methods inherited from class java.util.concurrent.locks.AbstractOwnableSynchronizer
getExclusiveOwnerThread, setExclusiveOwnerThread
-
-
-
-
Method Detail
-
isSignalled
public boolean isSignalled()
-
tryAcquireShared
public int tryAcquireShared(int ignore)
- Overrides:
tryAcquireShared
in classAbstractQueuedSynchronizer
-
tryReleaseShared
public boolean tryReleaseShared(int ignore)
- Overrides:
tryReleaseShared
in classAbstractQueuedSynchronizer
-
-