Class ForwardingLock

  • All Implemented Interfaces:
    java.util.concurrent.locks.Lock
    Direct Known Subclasses:
    Striped.WeakSafeLock

    abstract class ForwardingLock
    extends java.lang.Object
    implements java.util.concurrent.locks.Lock
    Forwarding wrapper around a Lock.
    • Constructor Detail

      • ForwardingLock

        ForwardingLock()
    • Method Detail

      • delegate

        abstract java.util.concurrent.locks.Lock delegate()
      • lock

        public void lock()
        Specified by:
        lock in interface java.util.concurrent.locks.Lock
      • lockInterruptibly

        public void lockInterruptibly()
                               throws java.lang.InterruptedException
        Specified by:
        lockInterruptibly in interface java.util.concurrent.locks.Lock
        Throws:
        java.lang.InterruptedException
      • tryLock

        public boolean tryLock()
        Specified by:
        tryLock in interface java.util.concurrent.locks.Lock
      • tryLock

        public boolean tryLock​(long time,
                               java.util.concurrent.TimeUnit unit)
                        throws java.lang.InterruptedException
        Specified by:
        tryLock in interface java.util.concurrent.locks.Lock
        Throws:
        java.lang.InterruptedException
      • unlock

        public void unlock()
        Specified by:
        unlock in interface java.util.concurrent.locks.Lock
      • newCondition

        public java.util.concurrent.locks.Condition newCondition()
        Specified by:
        newCondition in interface java.util.concurrent.locks.Lock