All Known Implementing Classes:
LockCleaner.CleanableLock, LockTracking.SimpleLock, StampedLockManager.OptimisticReadLock

public interface Lock
A lock on a specific monitor that can be used for synchronization purposes.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Extension of the Lock.Supplier interface to support tryLock().
    static interface 
    Functional interface for supplying a lock with support for InterruptedException.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks whether the lock is still active.
    void
    Release the lock, making it inactive.
  • Method Details

    • isActive

      boolean isActive()
      Checks whether the lock is still active.
    • release

      void release()
      Release the lock, making it inactive.