Interface Lockable


public interface Lockable
The Lockable interface is used for managing exclusive access to thread-safe classes.
Author:
bbc 2021.12.06
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    The Unlockable interface is used for releasing the exclusive access to this Lockable.
  • Method Summary

    Modifier and Type
    Method
    Description
    Suggest to this Lockable that the caller requires exclusive access until close is called on the returned AutoCloseable.
  • Method Details

    • exclusively

      default Lockable.Unlockable exclusively()
      Suggest to this Lockable that the caller requires exclusive access until close is called on the returned AutoCloseable.

      Note: the caller must call close on the returned object

      Returns:
      an AutoCloseable object that requires close to be called on it when exclusive access is no longer needed