Interface ExtendedLock

All Superinterfaces:
Lock
All Known Implementing Classes:
SpinLock

public interface ExtendedLock extends Lock
A thread-owned lock which exposes additional informational methods.
  • Method Details

    • isLocked

      boolean isLocked()
      Determine if this lock is held.
      Returns:
      true if this lock is held, false otherwise
    • isHeldByCurrentThread

      boolean isHeldByCurrentThread()
      Determine if this lock is held by the current thread.
      Returns:
      true if this lock is held by the current thread, false otherwise
    • isFair

      boolean isFair()
      Query if this lock instance tends to be "fair".
      Returns:
      true if the lock instance tends towards fairness, false otherwise