org.entityfs.support.util.concurrent.locks
Class ReadLockOwnerAwareReentrantReadWriteLock

java.lang.Object
  extended by java.util.concurrent.locks.ReentrantReadWriteLock
      extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.concurrent.locks.ReentrantReadWriteLock
ReentrantReadWriteLock.ReadLock, ReentrantReadWriteLock.WriteLock
 
Constructor Summary
ReadLockOwnerAwareReentrantReadWriteLock()
           
ReadLockOwnerAwareReentrantReadWriteLock(boolean fair)
           
 
Method Summary
 OwnerAwareReadLock ownerAwareReadLock()
          This method returns the owner-aware read lock.
 ReentrantReadWriteLock.ReadLock readLock()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReadLockOwnerAwareReentrantReadWriteLock

public ReadLockOwnerAwareReentrantReadWriteLock()

ReadLockOwnerAwareReentrantReadWriteLock

public ReadLockOwnerAwareReentrantReadWriteLock(boolean fair)
Method Detail

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.