public interface Persister<T>
| Modifier and Type | Method and Description |
|---|---|
State<T> |
getCurrent(T stateful)
Returns the current state.
|
void |
setCurrent(T stateful,
State<T> current,
State<T> next)
Set the current state to the next state.
|
void |
setStartState(State<T> startState)
Set the Start State
|
void |
setStates(Collection<State<T>> states)
Set the Collection of States to be managed by the Persister
|
State<T> getCurrent(T stateful)
stateful - Stateful Entityvoid setCurrent(T stateful, State<T> current, State<T> next) throws StaleStateException
stateful - StatefulEntitycurrent - Expected current State of the Stateful Entitynext - The value of the updated StateStaleStateException - thrown if the state value of the Stateful Entity is not equal to the passed in current
valuevoid setStates(Collection<State<T>> states)
states - Collection of StatesCopyright © 2016. All rights reserved.