Class AbstractStateMachinePersister<S,E,T>
java.lang.Object
org.springframework.statemachine.persist.AbstractStateMachinePersister<S,E,T>
- Type Parameters:
S
- the type of stateE
- the type of eventT
- the type of context object
- All Implemented Interfaces:
StateMachinePersister<S,
E, T>
- Direct Known Subclasses:
DefaultStateMachinePersister
,RedisStateMachinePersister
public abstract class AbstractStateMachinePersister<S,E,T>
extends Object
implements StateMachinePersister<S,E,T>
Base implementation of a
StateMachinePersister
easing persist
and restore operations with a StateMachinePersist
.- Author:
- Janne Valkealahti
-
Constructor Summary
ConstructorDescriptionAbstractStateMachinePersister
(StateMachinePersist<S, E, T> stateMachinePersist) Instantiates a new abstract state machine persister. -
Method Summary
Modifier and TypeMethodDescriptionprotected StateMachineContext<S,
E> buildStateMachineContext
(StateMachine<S, E> stateMachine) final void
persist
(StateMachine<S, E> stateMachine, T contextObj) Persist a state machine with a given context object.final StateMachine<S,
E> restore
(StateMachine<S, E> stateMachine, T contextObj) Reset a state machine with a given context object.
-
Constructor Details
-
AbstractStateMachinePersister
Instantiates a new abstract state machine persister.- Parameters:
stateMachinePersist
- the state machine persist
-
-
Method Details
-
persist
Description copied from interface:StateMachinePersister
Persist a state machine with a given context object. -
restore
public final StateMachine<S,E> restore(StateMachine<S, E> stateMachine, T contextObj) throws ExceptionDescription copied from interface:StateMachinePersister
Reset a state machine with a given context object. Returned machine has been reseted and is ready to be used. -
buildStateMachineContext
-