Class LockMRPlusSW

java.lang.Object
java.util.concurrent.locks.ReentrantLock
org.apache.jena.shared.LockMRPlusSW
All Implemented Interfaces:
Serializable, Lock, Lock

public class LockMRPlusSW extends ReentrantLock implements Lock
A multiple-reader plus single-writer lock. This lock permits readers to obtain their locks under any condition, but allows only one writer at a time. Writers can acquire a read lock, and readers can acquire the write lock.
See Also:
  • Constructor Details

    • LockMRPlusSW

      public LockMRPlusSW()
  • Method Details

    • enterCriticalSection

      public void enterCriticalSection(boolean readLockRequested)
      Description copied from interface: Lock
      Enter a critical section. The application must call leaveCriticialSection.
      Specified by:
      enterCriticalSection in interface Lock
      Parameters:
      readLockRequested - true implies a read lock, false implies write lock.
      See Also:
    • leaveCriticalSection

      public void leaveCriticalSection()
      Description copied from interface: Lock
      Leave a critical section. Releases the lock form the matching enterCriticalSection
      Specified by:
      leaveCriticalSection in interface Lock
      See Also: