java.util.concurrent.locks.Lock@Private @Unstable public class InstrumentedWriteLock extends InstrumentedLock
InstrumentedLock, and can be used to track
whether a specific write lock is being held for too long and log
warnings if so.
The logged warnings are throttled so that logs are not spammed.InstrumentedLock.SuppressedSnapshot| Constructor | Description |
|---|---|
InstrumentedWriteLock(java.lang.String name,
org.slf4j.Logger logger,
java.util.concurrent.locks.ReentrantReadWriteLock readWriteLock,
long minLoggingGapMs,
long lockWarningThresholdMs) |
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
startLockTiming() |
Starts timing for the instrumented write lock.
|
void |
unlock() |
check, getLock, getTimer, lock, lockInterruptibly, newCondition, tryLock, tryLockpublic InstrumentedWriteLock(java.lang.String name,
org.slf4j.Logger logger,
java.util.concurrent.locks.ReentrantReadWriteLock readWriteLock,
long minLoggingGapMs,
long lockWarningThresholdMs)
public void unlock()
unlock in interface java.util.concurrent.locks.Lockunlock in class InstrumentedLockprotected void startLockTiming()
startLockTiming in class InstrumentedLockCopyright © 2008–2025 Apache Software Foundation. All rights reserved.