Class RedisStateMachineContextRepository<S,E>
java.lang.Object
org.springframework.statemachine.data.redis.RedisStateMachineContextRepository<S,E>
- Type Parameters:
S- the type of stateE- the type of event
- All Implemented Interfaces:
StateMachineContextRepository<S,E, StateMachineContext<S, E>>
public class RedisStateMachineContextRepository<S,E>
extends Object
implements StateMachineContextRepository<S,E,StateMachineContext<S,E>>
A
StateMachineContextRepository backed by a redis and kryo serialization.-
Constructor Summary
ConstructorsConstructorDescriptionRedisStateMachineContextRepository(org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory) Instantiates a new redis state machine context repository. -
Method Summary
Modifier and TypeMethodDescriptiongetContext(String id) Gets the context.voidsave(StateMachineContext<S, E> context, String id) Save a context.
-
Constructor Details
-
RedisStateMachineContextRepository
public RedisStateMachineContextRepository(org.springframework.data.redis.connection.RedisConnectionFactory redisConnectionFactory) Instantiates a new redis state machine context repository.- Parameters:
redisConnectionFactory- the redis connection factory
-
-
Method Details
-
save
Description copied from interface:StateMachineContextRepositorySave a context.- Specified by:
savein interfaceStateMachineContextRepository<S,E, StateMachineContext<S, E>> - Parameters:
context- the contextid- the id
-
getContext
Description copied from interface:StateMachineContextRepositoryGets the context.- Specified by:
getContextin interfaceStateMachineContextRepository<S,E, StateMachineContext<S, E>> - Parameters:
id- the id- Returns:
- the context
-