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 Details

    • onContend

      void onContend(Thread thread, ConcurrentKeyLock<K,?>.LockState state)
      Called when the specified thread begins contending for a key lock.
      Parameters:
      thread - the contending thread
      state - the live contention state
    • onUncontend

      void onUncontend(Thread thread, ConcurrentKeyLock<K,?>.LockState state)
      Called when the specified thread stops contending for a key lock.
      Parameters:
      thread - the contending thread
      state - the live contention state