S
- the type of stateE
- the type of eventT
- the type of context objectpublic interface StateMachinePersister<S,E,T>
StateMachine
from
a persistent storage.Modifier and Type | Method and Description |
---|---|
void |
persist(StateMachine<S,E> stateMachine,
T contextObj)
Persist a state machine with a given context object.
|
StateMachine<S,E> |
restore(StateMachine<S,E> stateMachine,
T contextObj)
Reset a state machine with a given context object.
|
void persist(StateMachine<S,E> stateMachine, T contextObj) throws java.lang.Exception
stateMachine
- the state machinecontextObj
- the context ojbjava.lang.Exception
- the exception in case or any persist errorStateMachine<S,E> restore(StateMachine<S,E> stateMachine, T contextObj) throws java.lang.Exception
stateMachine
- the state machinecontextObj
- the context ojbjava.lang.Exception
- the exception in case or any persist error