Interface ConcurrentKeyLock.ContentionObserver<K>
- Type Parameters:
K- the key type
- Enclosing class:
ConcurrentKeyLock<K,V>
public static interface ConcurrentKeyLock.ContentionObserver<K>
Observe contention on key locks.
- Since:
- 26.04
- Author:
- Aleks Seovic 2026.04.10
-
Method Summary
Modifier and TypeMethodDescriptionvoidonContend(Thread thread, ConcurrentKeyLock<K, ?>.LockState state) Called when the specified thread begins contending for a key lock.voidonUncontend(Thread thread, ConcurrentKeyLock<K, ?>.LockState state) Called when the specified thread stops contending for a key lock.
-
Method Details
-
onContend
Called when the specified thread begins contending for a key lock.- Parameters:
thread- the contending threadstate- the live contention state
-
onUncontend
Called when the specified thread stops contending for a key lock.- Parameters:
thread- the contending threadstate- the live contention state
-