Class LockableObject

    • Nested Class Summary

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

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

      Constructors 
      Constructor Description
      LockableObject()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean isHeldExclusively()  
      void lock()  
      protected boolean tryAcquire​(int acquires)  
      protected boolean tryRelease​(int releases)  
      void unlock()  
      • 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, isQueued, owns, release, releaseShared, setState, toString, tryAcquireNanos, tryAcquireShared, tryAcquireSharedNanos, tryReleaseShared
      • 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

      • LockableObject

        public LockableObject()
    • Method Detail

      • isHeldExclusively

        protected final boolean isHeldExclusively()
        Overrides:
        isHeldExclusively in class java.util.concurrent.locks.AbstractQueuedSynchronizer
      • lock

        public final void lock()
      • unlock

        public final void unlock()
      • tryAcquire

        protected final boolean tryAcquire​(int acquires)
        Overrides:
        tryAcquire in class java.util.concurrent.locks.AbstractQueuedSynchronizer
      • tryRelease

        protected final boolean tryRelease​(int releases)
        Overrides:
        tryRelease in class java.util.concurrent.locks.AbstractQueuedSynchronizer