public class ReentrantReadWriteLockTracker extends ReentrantReadWriteLock
ReentrantReadWriteLock.ReadLock, ReentrantReadWriteLock.WriteLock
Constructor and Description |
---|
ReentrantReadWriteLockTracker() |
Modifier and Type | Method and Description |
---|---|
Set<ReadLockDebug> |
getLockedReadLocks() |
protected Thread |
getOwner() |
protected Collection<Thread> |
getQueuedReaderThreads() |
protected Collection<Thread> |
getQueuedThreads() |
protected Collection<Thread> |
getQueuedWriterThreads() |
int |
getReadHoldCount() |
int |
getReadLockCount() |
protected Collection<Thread> |
getWaitingThreads(Condition condition) |
int |
getWaitQueueLength(Condition condition) |
int |
getWriteHoldCount() |
boolean |
hasWaiters(Condition condition) |
boolean |
isWriteLocked() |
boolean |
isWriteLockedByCurrentThread() |
ReentrantReadWriteLock.ReadLock |
readLock() |
String |
toString() |
WriteLockDebug |
writeLock() |
getQueueLength, hasQueuedThread, hasQueuedThreads, isFair
protected Thread getOwner()
getOwner
in class ReentrantReadWriteLock
protected Collection<Thread> getQueuedReaderThreads()
getQueuedReaderThreads
in class ReentrantReadWriteLock
protected Collection<Thread> getQueuedThreads()
getQueuedThreads
in class ReentrantReadWriteLock
protected Collection<Thread> getQueuedWriterThreads()
getQueuedWriterThreads
in class ReentrantReadWriteLock
public int getReadHoldCount()
getReadHoldCount
in class ReentrantReadWriteLock
public int getReadLockCount()
getReadLockCount
in class ReentrantReadWriteLock
public int getWaitQueueLength(Condition condition)
getWaitQueueLength
in class ReentrantReadWriteLock
protected Collection<Thread> getWaitingThreads(Condition condition)
getWaitingThreads
in class ReentrantReadWriteLock
public int getWriteHoldCount()
getWriteHoldCount
in class ReentrantReadWriteLock
public boolean hasWaiters(Condition condition)
hasWaiters
in class ReentrantReadWriteLock
public boolean isWriteLocked()
isWriteLocked
in class ReentrantReadWriteLock
public boolean isWriteLockedByCurrentThread()
isWriteLockedByCurrentThread
in class ReentrantReadWriteLock
public ReentrantReadWriteLock.ReadLock readLock()
readLock
in interface ReadWriteLock
readLock
in class ReentrantReadWriteLock
public String toString()
toString
in class ReentrantReadWriteLock
public WriteLockDebug writeLock()
writeLock
in interface ReadWriteLock
writeLock
in class ReentrantReadWriteLock
public Set<ReadLockDebug> getLockedReadLocks()
Copyright © 2015–2022 The Apache Software Foundation. All rights reserved.