Class BaseLockingAction
- java.lang.Object
-
- org.infinispan.remoting.inboundhandler.action.BaseLockingAction
-
- All Implemented Interfaces:
Action
public abstract class BaseLockingAction extends java.lang.Object implements Action
A baseAction
implementation for locking. This contains the basic steps for lock acquisition: try to acquire, check when it is available and acquired (or not).- Since:
- 8.0
- Author:
- Pedro Ruivo
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
BaseLockingAction.InternalState
-
Constructor Summary
Constructors Constructor Description BaseLockingAction(DistributionManager distributionManager)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected boolean
cas(BaseLockingAction.InternalState expectedState, BaseLockingAction.InternalState newState)
ActionStatus
check(ActionState state)
It checks this action.protected abstract ActionStatus
checking(ActionState state)
protected java.util.List<java.lang.Object>
getAndUpdateFilteredKeys(ActionState state)
protected abstract ActionStatus
init(ActionState state)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.remoting.inboundhandler.action.Action
addListener, onException, onFinally
-
-
-
-
Constructor Detail
-
BaseLockingAction
public BaseLockingAction(DistributionManager distributionManager)
-
-
Method Detail
-
check
public final ActionStatus check(ActionState state)
Description copied from interface:Action
It checks this action. WhenActionStatus.READY
orActionStatus.CANCELED
are final states. This method should be thread safe and idempotent since it can be invoked multiple times by multiples threads.
-
checking
protected abstract ActionStatus checking(ActionState state)
-
init
protected abstract ActionStatus init(ActionState state)
-
cas
protected final boolean cas(BaseLockingAction.InternalState expectedState, BaseLockingAction.InternalState newState)
-
getAndUpdateFilteredKeys
protected final java.util.List<java.lang.Object> getAndUpdateFilteredKeys(ActionState state)
-
-