Class DummyConcurrentLock

  • All Implemented Interfaces:
    Lock

    public final class DummyConcurrentLock
    extends Object
    implements Lock
    A dummy lock as a replacement for ReentrantLock to disable locking
    NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
    • Field Detail

      • INSTANCE

        public static final DummyConcurrentLock INSTANCE
        a default instance, can be always used, as this Lock is stateless.
    • Constructor Detail

      • DummyConcurrentLock

        public DummyConcurrentLock()
    • 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