S - the type of stateE - the type of eventT - the type of persister context objectpublic class MongoDbPersistingStateMachineInterceptor<S,E,T> extends AbstractPersistingStateMachineInterceptor<S,E,T> implements StateMachineRuntimePersister<S,E,T>
MongoDb implementation of a AbstractPersistingStateMachineInterceptor.| Constructor and Description |
|---|
MongoDbPersistingStateMachineInterceptor(MongoDbRepositoryStateMachinePersist<S,E> persist)
Instantiates a new mongodb persisting state machine interceptor.
|
MongoDbPersistingStateMachineInterceptor(MongoDbStateMachineRepository mongodbStateMachineRepository)
Instantiates a new mongodb persisting state machine interceptor.
|
| Modifier and Type | Method and Description |
|---|---|
StateMachineInterceptor<S,E> |
getInterceptor()
Gets a
StateMachineInterceptor handling machine persistence. |
StateMachineContext<S,E> |
read(java.lang.Object contextObj)
Read
StateMachineContext from persistent store. |
void |
write(StateMachineContext<S,E> context,
T contextObj)
Write
StateMachineContext into persistent store. |
buildStateMachineContext, buildStateMachineContext, postStateChange, preStateChange, setExtendedStateVariablesFunctionpostTransition, preEvent, preTransition, stateMachineErrorpublic MongoDbPersistingStateMachineInterceptor(MongoDbStateMachineRepository mongodbStateMachineRepository)
mongodbStateMachineRepository - the mongodb state machine repositorypublic MongoDbPersistingStateMachineInterceptor(MongoDbRepositoryStateMachinePersist<S,E> persist)
persist - the persistpublic StateMachineInterceptor<S,E> getInterceptor()
StateMachineRuntimePersisterStateMachineInterceptor handling machine persistence.getInterceptor in interface StateMachineRuntimePersister<S,E,T>public void write(StateMachineContext<S,E> context, T contextObj) throws java.lang.Exception
AbstractPersistingStateMachineInterceptorStateMachineContext into persistent store.write in interface StateMachinePersist<S,E,T>write in class AbstractPersistingStateMachineInterceptor<S,E,T>context - the state machine contextcontextObj - the context objectjava.lang.Exception - the exceptionpublic StateMachineContext<S,E> read(java.lang.Object contextObj) throws java.lang.Exception
AbstractPersistingStateMachineInterceptorStateMachineContext from persistent store.read in interface StateMachinePersist<S,E,T>read in class AbstractPersistingStateMachineInterceptor<S,E,T>contextObj - the context objectjava.lang.Exception - the exception