org.entityfs.support.util.concurrent.locks
Class ReadLockOwnerAwareReentrantReadWriteLock
java.lang.Object
java.util.concurrent.locks.ReentrantReadWriteLock
org.entityfs.support.util.concurrent.locks.ReadLockOwnerAwareReentrantReadWriteLock
- All Implemented Interfaces:
- Serializable, ReadWriteLock
public class ReadLockOwnerAwareReentrantReadWriteLock
- extends ReentrantReadWriteLock
There's no way of getting the information on which threads that hold the read
lock from Java's ReentrantReadWriteLock
. EntityFS substitutes ReentrantReadWriteLock
for this implementation that adds that capability.
- Since:
- 1.0
- Author:
- Karl Gustafsson
- See Also:
OwnerAwareReadLock
,
Serialized Form- In_jar:
- entityfs-core
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, toString, writeLock |
ReadLockOwnerAwareReentrantReadWriteLock
public ReadLockOwnerAwareReentrantReadWriteLock()
ReadLockOwnerAwareReentrantReadWriteLock
public ReadLockOwnerAwareReentrantReadWriteLock(boolean fair)
readLock
public ReentrantReadWriteLock.ReadLock readLock()
- Specified by:
readLock
in interface ReadWriteLock
- Overrides:
readLock
in class ReentrantReadWriteLock
ownerAwareReadLock
public OwnerAwareReadLock ownerAwareReadLock()
- This method returns the owner-aware read lock. Use this instead of the
readLock()
method.
- Returns:
- The owner-aware read lock.