public class ReentrantReadWriteLockWithTracking extends Object implements ReadWriteLock
Modifier and Type | Class and Description |
---|---|
static class |
ReentrantReadWriteLockWithTracking.ReadLockWithTracking
Tracks long rlock holders.
|
Modifier and Type | Field and Description |
---|---|
static String |
LOCK_HOLD_MESSAGE
Lock hold message.
|
Constructor and Description |
---|
ReentrantReadWriteLockWithTracking()
Delegator implementation.
|
ReentrantReadWriteLockWithTracking(IgniteLogger log,
long readLockThreshold)
ReentrantRWLock wrapper, provides additional trace info on
ReentrantReadWriteLockWithTracking.ReadLockWithTracking.unlock() method, if someone
holds the lock more than readLockThreshold . |
Modifier and Type | Method and Description |
---|---|
int |
getReadHoldCount()
Queries the number of reentrant read holds on this lock by the
current thread.
|
int |
getReadLockCount()
Queries the number of read locks held for this lock.
|
boolean |
isWriteLockedByCurrentThread()
Queries if the write lock is held by the current thread.
|
long |
lockWaitThreshold() |
ReentrantReadWriteLock.ReadLock |
readLock() |
ReentrantReadWriteLock.WriteLock |
writeLock() |
public static final String LOCK_HOLD_MESSAGE
public ReentrantReadWriteLockWithTracking(IgniteLogger log, long readLockThreshold)
ReentrantReadWriteLockWithTracking.ReadLockWithTracking.unlock()
method, if someone
holds the lock more than readLockThreshold
.log
- Ignite logger.readLockThreshold
- ReadLock threshold timeout.public ReentrantReadWriteLockWithTracking()
public ReentrantReadWriteLock.ReadLock readLock()
readLock
in interface ReadWriteLock
public ReentrantReadWriteLock.WriteLock writeLock()
writeLock
in interface ReadWriteLock
public long lockWaitThreshold()
public boolean isWriteLockedByCurrentThread()
true
if the current thread holds the write lock and
false
otherwisepublic int getReadHoldCount()
public int getReadLockCount()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021