Class ReentrantCircuit.Sync

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    ReentrantCircuit

    private static final class ReentrantCircuit.Sync
    extends java.util.concurrent.locks.AbstractQueuedSynchronizer
    Synchronization state of 0 = closed, 1 = open.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.concurrent.locks.AbstractQueuedSynchronizer

        java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Sync()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Sync

        private Sync()
    • Method Detail

      • tryReleaseShared

        public boolean tryReleaseShared​(int ignored)
        Closes the circuit.
        Overrides:
        tryReleaseShared in class java.util.concurrent.locks.AbstractQueuedSynchronizer
      • tryAcquireShared

        protected int tryAcquireShared​(int acquires)
        Opens the circuit if not a test.
        Overrides:
        tryAcquireShared in class java.util.concurrent.locks.AbstractQueuedSynchronizer
      • isClosed

        private boolean isClosed()
      • open

        private void open()