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
AnActionimplementation that acquire the locks. It returnsActionStatus.READYwhen 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 voidaddListener(ActionListener listener)Adds a listener to be invoked when this action is ready or canceled.protected ActionStatuschecking(ActionState ignored)protected ActionStatusinit(ActionState state)voidonEvent(LockState state)Invoked when the lock is available.voidonException(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:
checkingin classBaseLockingAction
-
init
protected ActionStatus init(ActionState state)
- Specified by:
initin classBaseLockingAction
-
addListener
public void addListener(ActionListener listener)
Description copied from interface:ActionAdds a listener to be invoked when this action is ready or canceled.- Specified by:
addListenerin interfaceAction- Parameters:
listener- theActionListenerto add.
-
onException
public void onException(ActionState state)
Description copied from interface:ActionInvoked when an exception occurs while processing the command.- Specified by:
onExceptionin interfaceAction- Parameters:
state- the current state.
-
onEvent
public void onEvent(LockState state)
Description copied from interface:LockListenerInvoked when the lock is available.- Specified by:
onEventin interfaceLockListener- Parameters:
state- the lock state. Possible values areLockState.ACQUIRED,LockState.TIMED_OUTorLockState.DEADLOCKED.
-
-