Interface AwareLock

All Superinterfaces:
Lock
All Known Subinterfaces:
AwareFunctionalLock

public interface AwareLock extends Lock
Extension to the Lock interface to make awareness of the current thread's state accessible.
  • Method Details

    • isHeldByCurrentThread

      boolean isHeldByCurrentThread()
      Query whether the current thread holds this lock.
      Returns:
      True if the current thread holds this lock, else false