Class DebugDisabledTimedLock

java.lang.Object
org.apache.nifi.util.concurrency.DebugDisabledTimedLock
All Implemented Interfaces:
DebuggableTimedLock

public class DebugDisabledTimedLock extends Object implements DebuggableTimedLock
  • Field Details

    • lock

      private final Lock lock
  • Constructor Details

    • DebugDisabledTimedLock

      public DebugDisabledTimedLock(Lock lock)
  • Method Details

    • tryLock

      public boolean tryLock()
      Specified by:
      tryLock in interface DebuggableTimedLock
      Returns:
      true if lock obtained; false otherwise
    • tryLock

      public boolean tryLock(long timeout, TimeUnit timeUnit)
      Specified by:
      tryLock in interface DebuggableTimedLock
      Parameters:
      timeout - the duration of time to wait for the lock
      timeUnit - the unit which provides meaning to the duration
      Returns:
      true if obtained lock in time; false otherwise
    • lock

      public void lock()
      Specified by:
      lock in interface DebuggableTimedLock
    • unlock

      public void unlock(String task)
      Specified by:
      unlock in interface DebuggableTimedLock