public class KeyedLock<T>
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
Releasable |
acquire(T key) |
boolean |
hasLockedKeys() |
boolean |
isHeldByCurrentThread(T key) |
public KeyedLock(boolean fair)
fair
- Use fair locking, ie threads get the lock in the order they requested itpublic KeyedLock()
public Releasable acquire(T key)
public boolean isHeldByCurrentThread(T key)
public boolean hasLockedKeys()