Package org.apache.juneau.internal
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.locks.ReentrantReadWriteLock
ReentrantReadWriteLock.ReadLock, ReentrantReadWriteLock.WriteLock
-
Constructor Summary
-
Method Summary
Methods inherited from class java.util.concurrent.locks.ReentrantReadWriteLock
getOwner, getQueuedReaderThreads, getQueuedThreads, getQueuedWriterThreads, getQueueLength, getReadHoldCount, getReadLockCount, getWaitingThreads, getWaitQueueLength, getWriteHoldCount, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isWriteLocked, isWriteLockedByCurrentThread, readLock, toString, writeLock
-
Constructor Details
-
SimpleNoOpLock
public SimpleNoOpLock()Constructor. -
SimpleNoOpLock
Constructor- Parameters:
fair
-true if this lock should use a fair ordering policy.
-
-
Method Details
-
write
Construct a write lock.- Returns:
- A new closeable write lock.
-
read
Construct a read lock.- Returns:
- A new closeable read lock.
-