Package org.springframework.statemachine
Interface StateMachinePersist<S,E,T>
- Type Parameters:
S
- the type of stateE
- the type of eventT
- the type of context object
- All Known Subinterfaces:
StateMachineRuntimePersister<S,
E, T>
- All Known Implementing Classes:
AbstractPersistingStateMachineInterceptor
,JpaPersistingStateMachineInterceptor
,JpaRepositoryStateMachinePersist
,MongoDbPersistingStateMachineInterceptor
,MongoDbRepositoryStateMachinePersist
,RedisPersistingStateMachineInterceptor
,RedisRepositoryStateMachinePersist
,RepositoryStateMachinePersist
,RepositoryStateMachinePersist
,ZookeeperStateMachinePersist
public interface StateMachinePersist<S,E,T>
StateMachinePersist
is an interface handling serialization
logic of a StateMachineContext
.-
Method Summary
Modifier and TypeMethodDescriptionRead aStateMachineContext
from a persistent store with a context objectT
.void
write
(StateMachineContext<S, E> context, T contextObj) Write aStateMachineContext
into a persistent store with a context objectT
.
-
Method Details
-
write
Write aStateMachineContext
into a persistent store with a context objectT
.- Parameters:
context
- the contextcontextObj
- the context ojb- Throws:
Exception
- the exception
-
read
Read aStateMachineContext
from a persistent store with a context objectT
.- Parameters:
contextObj
- the context ojb- Returns:
- the state machine context
- Throws:
Exception
- the exception
-