Package org.wildfly.common.lock
Class Locks
java.lang.Object
org.wildfly.common.lock.Locks
A utility class to create
ExtendedLock objects.-
Method Summary
Modifier and TypeMethodDescriptionstatic ExtendedLockCreate a standard reentrantExtendedLockwith the default fairness policy.static ExtendedLockreentrantLock(boolean fair) Create a standard reentrantExtendedLockwith the given fairness policy.static ExtendedLockspinLock()Create a spin lock.
-
Method Details
-
reentrantLock
Create a standard reentrantExtendedLockwith the default fairness policy.- Returns:
- a reentrant
ExtendedLock
-
reentrantLock
Create a standard reentrantExtendedLockwith the given fairness policy.- Parameters:
fair- the fairness policy- Returns:
- a reentrant
ExtendedLock
-
spinLock
Create a spin lock.- Returns:
- the spin lock
- See Also:
-