Class SimpleNoOpLock

java.lang.Object
java.util.concurrent.locks.ReentrantReadWriteLock
org.apache.juneau.internal.SimpleNoOpLock
All Implemented Interfaces:
Serializable, ReadWriteLock

An extension of ReentrantReadWriteLock with convenience methods for creating auto-closeable locks.
See Also:
  • Constructor Details

    • SimpleNoOpLock

      public SimpleNoOpLock()
      Constructor.
    • SimpleNoOpLock

      public SimpleNoOpLock(boolean fair)
      Constructor
      Parameters:
      fair - true if this lock should use a fair ordering policy.
  • Method Details

    • write

      public SimpleLock write()
      Construct a write lock.
      Returns:
      A new closeable write lock.
    • read

      public SimpleLock read()
      Construct a read lock.
      Returns:
      A new closeable read lock.