S
- the type of stateE
- the type of eventpublic class RepositoryStateMachinePersist<S,E> extends java.lang.Object implements StateMachinePersist<S,E,java.lang.String>
StateMachinePersist
using a generic StateMachineContextRepository
for persisting StateMachineContext
.Constructor and Description |
---|
RepositoryStateMachinePersist(StateMachineContextRepository<S,E,StateMachineContext<S,E>> repository)
Instantiates a new repository state machine persist.
|
Modifier and Type | Method and Description |
---|---|
StateMachineContext<S,E> |
read(java.lang.String contextObj)
Read a
StateMachineContext from a persistent store
with a context object T . |
void |
write(StateMachineContext<S,E> context,
java.lang.String contextObj)
Write a
StateMachineContext into a persistent store
with a context object T . |
public RepositoryStateMachinePersist(StateMachineContextRepository<S,E,StateMachineContext<S,E>> repository)
repository
- the repositorypublic void write(StateMachineContext<S,E> context, java.lang.String contextObj) throws java.lang.Exception
StateMachinePersist
StateMachineContext
into a persistent store
with a context object T
.write
in interface StateMachinePersist<S,E,java.lang.String>
context
- the contextcontextObj
- the context ojbjava.lang.Exception
- the exceptionpublic StateMachineContext<S,E> read(java.lang.String contextObj) throws java.lang.Exception
StateMachinePersist
StateMachineContext
from a persistent store
with a context object T
.read
in interface StateMachinePersist<S,E,java.lang.String>
contextObj
- the context ojbjava.lang.Exception
- the exception