Class CycleDetectingLockFactory.CycleDetectingReentrantReadWriteLock
java.lang.Object
java.util.concurrent.locks.ReentrantReadWriteLock
com.google.common.util.concurrent.CycleDetectingLockFactory.CycleDetectingReentrantReadWriteLock
- All Implemented Interfaces:
CycleDetectingLockFactory.CycleDetectingLock
,Serializable
,ReadWriteLock
- Enclosing class:
CycleDetectingLockFactory
final class CycleDetectingLockFactory.CycleDetectingReentrantReadWriteLock
extends ReentrantReadWriteLock
implements CycleDetectingLockFactory.CycleDetectingLock
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.locks.ReentrantReadWriteLock
ReentrantReadWriteLock.ReadLock, ReentrantReadWriteLock.WriteLock
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
CycleDetectingReentrantReadWriteLock
(CycleDetectingLockFactory.LockGraphNode lockGraphNode, boolean fair) -
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, toString
-
Field Details
-
readLock
-
writeLock
-
lockGraphNode
-
-
Constructor Details
-
CycleDetectingReentrantReadWriteLock
private CycleDetectingReentrantReadWriteLock(CycleDetectingLockFactory.LockGraphNode lockGraphNode, boolean fair)
-
-
Method Details
-
readLock
- Specified by:
readLock
in interfaceReadWriteLock
- Overrides:
readLock
in classReentrantReadWriteLock
-
writeLock
- Specified by:
writeLock
in interfaceReadWriteLock
- Overrides:
writeLock
in classReentrantReadWriteLock
-
getLockGraphNode
- Specified by:
getLockGraphNode
in interfaceCycleDetectingLockFactory.CycleDetectingLock
- Returns:
- the
CycleDetectingLockFactory.LockGraphNode
associated with this lock.
-
isAcquiredByCurrentThread
public boolean isAcquiredByCurrentThread()- Specified by:
isAcquiredByCurrentThread
in interfaceCycleDetectingLockFactory.CycleDetectingLock
- Returns:
true
if the current thread has acquired this lock.
-