Class ExclusiveReentrantLockManager.ExclusiveReentrantLock

  • All Implemented Interfaces:
    Lock
    Enclosing class:
    ExclusiveReentrantLockManager

    static class ExclusiveReentrantLockManager.ExclusiveReentrantLock
    extends java.lang.Object
    implements Lock
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.util.concurrent.atomic.AtomicLong activeLocks  
      (package private) java.util.concurrent.atomic.AtomicReference<java.lang.Thread> owner  
      private boolean released  
    • Constructor Summary

      Constructors 
      Constructor Description
      ExclusiveReentrantLock​(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> owner, java.util.concurrent.atomic.AtomicLong activeLocks)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isActive()
      Checks whether the lock is still active.
      void release()
      Release the lock, making it inactive.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • activeLocks

        final java.util.concurrent.atomic.AtomicLong activeLocks
      • owner

        final java.util.concurrent.atomic.AtomicReference<java.lang.Thread> owner
      • released

        private boolean released
    • Constructor Detail

      • ExclusiveReentrantLock

        public ExclusiveReentrantLock​(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> owner,
                                      java.util.concurrent.atomic.AtomicLong activeLocks)
    • Method Detail

      • isActive

        public boolean isActive()
        Description copied from interface: Lock
        Checks whether the lock is still active.
        Specified by:
        isActive in interface Lock
      • release

        public void release()
        Description copied from interface: Lock
        Release the lock, making it inactive.
        Specified by:
        release in interface Lock