Class ReentrantCircuit.Sync
java.lang.Object
java.util.concurrent.locks.AbstractOwnableSynchronizer
java.util.concurrent.locks.AbstractQueuedSynchronizer
net.jodah.concurrentunit.internal.ReentrantCircuit.Sync
- All Implemented Interfaces:
Serializable
- Enclosing class:
ReentrantCircuit
Synchronization state of 0 = closed, 1 = open.
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractQueuedSynchronizer
AbstractQueuedSynchronizer.ConditionObject -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanisClosed()private voidopen()protected inttryAcquireShared(int acquires) Opens the circuit if not a test.booleantryReleaseShared(int ignored) Closes the circuit.Methods inherited from class 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, tryReleaseMethods inherited from class AbstractOwnableSynchronizer
getExclusiveOwnerThread, setExclusiveOwnerThread
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
Sync
private Sync()
-
-
Method Details
-
isClosed
private boolean isClosed() -
open
private void open()