Interface StateMachineService<S,E>

Type Parameters:
S - the type of state
E - 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 Details

    • acquireStateMachine

      StateMachine<S,E> acquireStateMachine(String machineId)
      Acquires the state machine. Machine from this method is returned started.
      Parameters:
      machineId - the machine id
      Returns:
      the state machine
      See Also:
    • acquireStateMachine

      StateMachine<S,E> acquireStateMachine(String machineId, boolean start)
      Acquires the state machine.
      Parameters:
      machineId - the machine id
      start - indicating if machine should be returned started
      Returns:
      the state machine
    • releaseStateMachine

      void releaseStateMachine(String machineId)
      Release the state machine. Machine with this method is stopped.
      Parameters:
      machineId - the machine id
      See Also:
    • releaseStateMachine

      void releaseStateMachine(String machineId, boolean stop)
      Release state machine.
      Parameters:
      machineId - the machine id
      stop - indicating if machine should be stopped