Package com.tangosol.util.fsm
Class Instruction.TransitionTo<S extends Enum<S>>
java.lang.Object
com.tangosol.util.fsm.Instruction.TransitionTo<S>
- All Implemented Interfaces:
Event<S>,Instruction
- Enclosing interface:
Instruction
public static final class Instruction.TransitionTo<S extends Enum<S>>
extends Object
implements Instruction, Event<S>
An
Instruction for a FiniteStateMachine to Instruction.TransitionTo another state. (immediately on the thread that created
the Instruction).-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tangosol.util.fsm.Instruction
Instruction.ProcessEvent<S extends Enum<S>>, Instruction.TransitionTo<S extends Enum<S>> -
Field Summary
Fields inherited from interface com.tangosol.util.fsm.Instruction
NOTHING, STOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDesiredState(S currentState, ExecutionContext context) Determines the desired state of theFiniteStateMachinefor theEventgiven the current state of theFiniteStateMachine.toString()
-
Constructor Details
-
TransitionTo
Constructs aInstruction.TransitionTo.- Parameters:
desiredState- the desired state to which to transition
-
-
Method Details
-
getDesiredState
Determines the desired state of theFiniteStateMachinefor theEventgiven the current state of theFiniteStateMachine.- Specified by:
getDesiredStatein interfaceEvent<S extends Enum<S>>- Parameters:
currentState- the current state of theFiniteStateMachinecontext- theExecutionContextfor theEvent- Returns:
- the desired state of the
FiniteStateMachineornullif no transition is required
-
toString
-