S
- the type of stateE
- the type of eventpublic class RedisStateMachineContextRepository<S,E> extends java.lang.Object implements StateMachineContextRepository<S,E,StateMachineContext<S,E>>
StateMachineContextRepository
backed by a redis and kryo serialization.Constructor and Description |
---|
RedisStateMachineContextRepository(org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory)
Instantiates a new redis state machine context repository.
|
Modifier and Type | Method and Description |
---|---|
StateMachineContext<S,E> |
getContext(java.lang.String id)
Gets the context.
|
void |
save(StateMachineContext<S,E> context,
java.lang.String id)
Save a context.
|
public RedisStateMachineContextRepository(org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory)
redisConnectionFactory
- the redis connection factorypublic void save(StateMachineContext<S,E> context, java.lang.String id)
StateMachineContextRepository
save
in interface StateMachineContextRepository<S,E,StateMachineContext<S,E>>
context
- the contextid
- the idpublic StateMachineContext<S,E> getContext(java.lang.String id)
StateMachineContextRepository
getContext
in interface StateMachineContextRepository<S,E,StateMachineContext<S,E>>
id
- the id