Class DistributedLeaderAction<S,E>

java.lang.Object
org.springframework.statemachine.action.DistributedLeaderAction<S,E>
Type Parameters:
S - the type of state
E - the type of event
All Implemented Interfaces:
Action<S,E>

public class DistributedLeaderAction<S,E> extends Object implements 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 Details

    • DistributedLeaderAction

      public DistributedLeaderAction(Action<S,E> action, StateMachineEnsemble<S,E> ensemble)
      Instantiates a new distributed leader action.
      Parameters:
      action - the action
      ensemble - the ensemble
  • Method Details