Package org.wildfly.common.lock
Interface ExtendedLock
-
- All Superinterfaces:
java.util.concurrent.locks.Lock
- All Known Implementing Classes:
SpinLock
public interface ExtendedLock extends java.util.concurrent.locks.LockA thread-owned lock which exposes additional informational methods.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisFair()Query if this lock instance tends to be "fair".booleanisHeldByCurrentThread()Determine if this lock is held by the current thread.booleanisLocked()Determine if this lock is held.
-
-
-
Method Detail
-
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
-
-