Interface ExtendedLockPromise
-
- All Superinterfaces:
LockPromise
public interface ExtendedLockPromise extends LockPromise
An extendedLockPromise
interface that allows a better control over it.- Since:
- 8.0
- Author:
- Pedro Ruivo
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cancel(LockState cause)
It cancels theLockPromise
if possible.java.lang.Object
getOwner()
java.lang.Object
getRequestor()
InvocationStage
toInvocationStage(java.util.function.Supplier<TimeoutException> timeoutSupplier)
-
Methods inherited from interface org.infinispan.util.concurrent.locks.LockPromise
addListener, isAvailable, lock, toInvocationStage
-
-
-
-
Method Detail
-
cancel
void cancel(LockState cause)
It cancels theLockPromise
if possible.- Parameters:
cause
- the cancellation cause. The possible values areLockState.DEADLOCKED
andLockState.TIMED_OUT
.- Throws:
java.lang.IllegalArgumentException
- if the argumentcause
is not valid.
-
getRequestor
java.lang.Object getRequestor()
- Returns:
- the lock owner associated to this
LockPromise
.
-
getOwner
java.lang.Object getOwner()
- Returns:
- the current lock owner.
-
toInvocationStage
InvocationStage toInvocationStage(java.util.function.Supplier<TimeoutException> timeoutSupplier)
- Returns:
- an
InvocationStage
for this lock.
-
-