Class LockAction
- java.lang.Object
-
- org.infinispan.remoting.inboundhandler.action.BaseLockingAction
-
- org.infinispan.remoting.inboundhandler.action.LockAction
-
- All Implemented Interfaces:
Action
,LockListener
public class LockAction extends BaseLockingAction implements LockListener
AnAction
implementation that acquire the locks.It returns
ActionStatus.READY
when the locks are available to acquired or the acquisition failed (timeout or deadlock).- Since:
- 8.0
- Author:
- Pedro Ruivo
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.infinispan.remoting.inboundhandler.action.BaseLockingAction
BaseLockingAction.InternalState
-
-
Constructor Summary
Constructors Constructor Description LockAction(LockManager lockManager, DistributionManager distributionManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(ActionListener listener)
Adds a listener to be invoked when this action is ready or canceled.protected ActionStatus
checking(ActionState ignored)
protected ActionStatus
init(ActionState state)
void
onEvent(LockState state)
Invoked when the lock is available.void
onException(ActionState state)
Invoked when an exception occurs while processing the command.-
Methods inherited from class org.infinispan.remoting.inboundhandler.action.BaseLockingAction
cas, check, getAndUpdateFilteredKeys
-
-
-
-
Constructor Detail
-
LockAction
public LockAction(LockManager lockManager, DistributionManager distributionManager)
-
-
Method Detail
-
checking
protected ActionStatus checking(ActionState ignored)
- Specified by:
checking
in classBaseLockingAction
-
init
protected ActionStatus init(ActionState state)
- Specified by:
init
in classBaseLockingAction
-
addListener
public void addListener(ActionListener listener)
Description copied from interface:Action
Adds a listener to be invoked when this action is ready or canceled.- Specified by:
addListener
in interfaceAction
- Parameters:
listener
- theActionListener
to add.
-
onException
public void onException(ActionState state)
Description copied from interface:Action
Invoked when an exception occurs while processing the command.- Specified by:
onException
in interfaceAction
- Parameters:
state
- the current state.
-
onEvent
public void onEvent(LockState state)
Description copied from interface:LockListener
Invoked when the lock is available.- Specified by:
onEvent
in interfaceLockListener
- Parameters:
state
- the lock state. Possible values areLockState.ACQUIRED
,LockState.TIMED_OUT
orLockState.DEADLOCKED
.
-
-