Package com.tangosol.util.fsm
Interface TransitionAction<S extends Enum<S>>
public interface TransitionAction<S extends Enum<S>>
A
TransitionAction encapsulates the actions to be performed as part
of the Transition from one state to another.- Since:
- Coherence 12.2.1
- Author:
- Brian Oliver
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidonTransition(String sName, S stateFrom, S stateTo, Event<S> event, ExecutionContext context) Performs the necessary actions as part of aTransitionfrom one state to another, triggered by a specifiedEvent.
-
Method Details
-
onTransition
void onTransition(String sName, S stateFrom, S stateTo, Event<S> event, ExecutionContext context) throws RollbackTransitionException Performs the necessary actions as part of aTransitionfrom one state to another, triggered by a specifiedEvent.Note: After executing this method the
FiniteStateMachinewill automatically move to the state specified by theTransition.- Parameters:
sName- the name of the transitionstateFrom- the state from which the transition is occurringstateTo- the state to which the transition is occurringevent- theEventthat triggered theTransitioncontext- theExecutionContextfor the action- Throws:
RollbackTransitionException- if theTransitionshould be aborted and theFiniteStateMachineshould be left in it's current state
-