public class LockAction extends BaseLockingAction implements LockListener
Action
implementation that acquire the locks.
It returns ActionStatus.READY
when the locks are available to acquired or the acquisition failed (timeout or
deadlock).BaseLockingAction.InternalState
Constructor and Description |
---|
LockAction(LockManager lockManager,
ClusteringDependentLogic clusteringDependentLogic) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(ActionListener listener)
Adds a listener to be invoked when this action is ready or canceled.
|
protected ActionStatus |
checking(ActionState ignored) |
void |
cleanup(ActionState state)
Cleanups when it is no longer needed.
|
protected ActionStatus |
init(ActionState state) |
void |
onEvent(LockState state)
Invoked when the lock is available.
|
cas, check, getAndUpdateFilteredKeys
public LockAction(LockManager lockManager, ClusteringDependentLogic clusteringDependentLogic)
protected ActionStatus checking(ActionState ignored)
checking
in class BaseLockingAction
protected ActionStatus init(ActionState state)
init
in class BaseLockingAction
public void addListener(ActionListener listener)
Action
addListener
in interface Action
listener
- the ActionListener
to add.public void cleanup(ActionState state)
Action
cleanup
in interface Action
cleanup
in class BaseLockingAction
public void onEvent(LockState state)
LockListener
onEvent
in interface LockListener
state
- the lock state. Possible values are LockState.ACQUIRED
, LockState.TIMED_OUT
or
LockState.DEADLOCKED
.Copyright © 2020 JBoss, a division of Red Hat. All rights reserved.