public abstract class LongHeldDetectingReadWriteLock extends Object implements ReadWriteLock
ReadWriteLock that can report some info when the lock is held by a thread very long time.| Modifier and Type | Class and Description |
|---|---|
static class |
LongHeldDetectingReadWriteLock.AcquireMode |
| Constructor and Description |
|---|
LongHeldDetectingReadWriteLock(boolean fair,
long maxBlockingTimeToReport,
TimeUnit unit) |
LongHeldDetectingReadWriteLock(long maxBlockingTimeToReport,
TimeUnit unit) |
| Modifier and Type | Method and Description |
|---|---|
Lock |
readLock() |
abstract void |
report(LongHeldDetectingReadWriteLock.AcquireMode acquireMode,
Thread heldThread,
Collection<Thread> queuedThreads,
long blockedNanos) |
Lock |
writeLock() |
public LongHeldDetectingReadWriteLock(long maxBlockingTimeToReport,
TimeUnit unit)
public LongHeldDetectingReadWriteLock(boolean fair,
long maxBlockingTimeToReport,
TimeUnit unit)
public Lock readLock()
readLock in interface ReadWriteLockpublic Lock writeLock()
writeLock in interface ReadWriteLockpublic abstract void report(LongHeldDetectingReadWriteLock.AcquireMode acquireMode, Thread heldThread, Collection<Thread> queuedThreads, long blockedNanos)
Copyright © 2024. All rights reserved.