Class NonReentrantLock

  • All Implemented Interfaces:
    java.util.concurrent.locks.Lock

    public final class NonReentrantLock
    extends java.lang.Object
    implements java.util.concurrent.locks.Lock
    A simplistic non-reentrant lock that does not use ownership by thread.
    • Constructor Detail

      • NonReentrantLock

        public NonReentrantLock()
    • Method Detail

      • lock

        public void lock()
      • lockInterruptibly

        public void lockInterruptibly()
                               throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • tryLock

        public boolean tryLock()
      • tryLock

        public boolean tryLock​(long time,
                               java.util.concurrent.TimeUnit unit)
                        throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • unlock

        public void unlock()
      • newCondition

        public java.util.concurrent.locks.Condition newCondition()