Class LockMRPlusSW

  • All Implemented Interfaces:, java.util.concurrent.locks.Lock, Lock

    public class LockMRPlusSW
    extends java.util.concurrent.locks.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:
    Serialized Form
    • Field Summary

      • Fields inherited from interface org.apache.jena.shared.Lock

        READ, WRITE
    • Constructor Summary

      Constructor Description
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void enterCriticalSection​(boolean readLockRequested)
      Enter a critical section.
      void leaveCriticalSection()
      Leave a critical section.
      • Methods inherited from class java.util.concurrent.locks.ReentrantLock

        getHoldCount, getQueueLength, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isHeldByCurrentThread, isLocked, lock, lockInterruptibly, newCondition, toString, tryLock, tryLock, unlock
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • LockMRPlusSW

        public LockMRPlusSW()
    • Method Detail

      • 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
        readLockRequested - true implies a read lock, false implies write lock.
        See Also: