Class NoLock

  • All Implemented Interfaces:
    Lock

    public class NoLock
    extends Object
    implements Lock
    Empty lock implementation
    • Field Detail

      • INSTANCE

        public static final Lock INSTANCE
    • Constructor Detail

      • NoLock

        public NoLock()
    • Method Detail

      • lock

        public void lock()
        Specified by:
        lock in interface Lock
      • lockInterruptibly

        public void lockInterruptibly()
        Specified by:
        lockInterruptibly in interface Lock
      • tryLock

        public boolean tryLock()
        Specified by:
        tryLock in interface Lock
      • tryLock

        public boolean tryLock​(long time,
                               TimeUnit unit)
        Specified by:
        tryLock in interface Lock
      • unlock

        public void unlock()
        Specified by:
        unlock in interface Lock