S
- the type of stateE
- the type of eventT
- the type of persister context objectpublic class RedisPersistingStateMachineInterceptor<S,E,T> extends AbstractPersistingStateMachineInterceptor<S,E,T> implements StateMachineRuntimePersister<S,E,T>
JPA
implementation of a AbstractPersistingStateMachineInterceptor
.Constructor and Description |
---|
RedisPersistingStateMachineInterceptor(RedisRepositoryStateMachinePersist<S,E> persist)
Instantiates a new redis persisting state machine interceptor.
|
RedisPersistingStateMachineInterceptor(RedisStateMachineRepository redisStateMachineRepository)
Instantiates a new redis 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, setExtendedStateVariablesFunction
postTransition, preEvent, preTransition, stateMachineError
public RedisPersistingStateMachineInterceptor(RedisStateMachineRepository redisStateMachineRepository)
redisStateMachineRepository
- the redis state machine repositorypublic RedisPersistingStateMachineInterceptor(RedisRepositoryStateMachinePersist<S,E> persist)
persist
- the persistpublic StateMachineInterceptor<S,E> getInterceptor()
StateMachineRuntimePersister
StateMachineInterceptor
handling machine persistence.getInterceptor
in interface StateMachineRuntimePersister<S,E,T>
public void write(StateMachineContext<S,E> context, T contextObj) throws java.lang.Exception
AbstractPersistingStateMachineInterceptor
StateMachineContext
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
AbstractPersistingStateMachineInterceptor
StateMachineContext
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