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.Lock
A thread-owned lock which exposes additional informational methods.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isFair()
Query if this lock instance tends to be "fair".boolean
isHeldByCurrentThread()
Determine if this lock is held by the current thread.boolean
isLocked()
Determine if this lock is held.
-
-
-
Method Detail
-
isLocked
boolean isLocked()
Determine if this lock is held.- Returns:
true
if this lock is held,false
otherwise
-
isHeldByCurrentThread
boolean isHeldByCurrentThread()
Determine if this lock is held by the current thread.- Returns:
true
if this lock is held by the current thread,false
otherwise
-
isFair
boolean isFair()
Query if this lock instance tends to be "fair".- Returns:
true
if the lock instance tends towards fairness,false
otherwise
-
-