Package org.apache.jena.shared
Class LockMRPlusSW
- java.lang.Object
-
- java.util.concurrent.locks.ReentrantLock
-
- org.apache.jena.shared.LockMRPlusSW
-
- All Implemented Interfaces:
java.io.Serializable
,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
-
-
Constructor Summary
Constructors Constructor Description LockMRPlusSW()
-
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.
-
-
-
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 interfaceLock
- Parameters:
readLockRequested
- true implies a read lock, false implies write lock.- See Also:
Lock.leaveCriticalSection()
-
leaveCriticalSection
public void leaveCriticalSection()
Description copied from interface:Lock
Leave a critical section. Releases the lock form the matching enterCriticalSection- Specified by:
leaveCriticalSection
in interfaceLock
- See Also:
Lock.enterCriticalSection(boolean)
-
-