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 java.util.concurrent.locks.AbstractQueuedSynchronizer
AbstractQueuedSynchronizer.ConditionObject
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
isClosed()
private void
open()
protected int
tryAcquireShared
(int acquires) Opens the circuit if not a test.boolean
tryReleaseShared
(int ignored) Closes the circuit.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
-
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()