Interface StateMachineService<S,E>
- Type Parameters:
S- the type of stateE- the type of event
- All Known Implementing Classes:
DefaultStateMachineService
public interface StateMachineService<S,E>
Service class helping to persist and restore
StateMachines
in a runtime environment.- Author:
- Janne Valkealahti
-
Method Summary
Modifier and TypeMethodDescriptionacquireStateMachine(String machineId) Acquires the state machine.acquireStateMachine(String machineId, boolean start) Acquires the state machine.voidreleaseStateMachine(String machineId) Release the state machine.voidreleaseStateMachine(String machineId, boolean stop) Release state machine.
-
Method Details
-
acquireStateMachine
Acquires the state machine. Machine from this method is returned started.- Parameters:
machineId- the machine id- Returns:
- the state machine
- See Also:
-
acquireStateMachine
Acquires the state machine.- Parameters:
machineId- the machine idstart- indicating if machine should be returned started- Returns:
- the state machine
-
releaseStateMachine
Release the state machine. Machine with this method is stopped.- Parameters:
machineId- the machine id- See Also:
-
releaseStateMachine
Release state machine.- Parameters:
machineId- the machine idstop- indicating if machine should be stopped
-