Package org.wildfly.common.lock
Interface ExtendedLock
- All Superinterfaces:
Lock
- All Known Implementing Classes:
SpinLock
A thread-owned lock which exposes additional informational methods.
-
Method Summary
Methods inherited from interface java.util.concurrent.locks.Lock
lock, lockInterruptibly, newCondition, tryLock, tryLock, unlock
-
Method Details
-
isLocked
boolean isLocked()Determine if this lock is held.- Returns:
trueif this lock is held,falseotherwise
-
isHeldByCurrentThread
boolean isHeldByCurrentThread()Determine if this lock is held by the current thread.- Returns:
trueif this lock is held by the current thread,falseotherwise
-
isFair
boolean isFair()Query if this lock instance tends to be "fair".- Returns:
trueif the lock instance tends towards fairness,falseotherwise
-