Class DistributedLeaderAction<S,E>
java.lang.Object
org.springframework.statemachine.action.DistributedLeaderAction<S,E>
- Type Parameters:
S- the type of stateE- the type of event
- All Implemented Interfaces:
Action<S,E>
Action which is used to wrap execution of an Action
so that only a StateMachine considered to be a leader in an
StateMachineEnsemble will do the execution.
Executing action via DistributedLeaderAction is bound to if
current machine is a leader or not. Effectively this means that if
leader doesn't exist, execution is discarded.- Author:
- Janne Valkealahti
-
Constructor Summary
ConstructorsConstructorDescriptionDistributedLeaderAction(Action<S, E> action, StateMachineEnsemble<S, E> ensemble) Instantiates a new distributed leader action. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(StateContext<S, E> context) Execute action with aStateContext.
-
Constructor Details
-
DistributedLeaderAction
Instantiates a new distributed leader action.- Parameters:
action- the actionensemble- the ensemble
-
-
Method Details