Class RedisRepositoryStateMachinePersist<S,E>
java.lang.Object
org.springframework.statemachine.data.RepositoryStateMachinePersist<RedisRepositoryStateMachine,S,E>
org.springframework.statemachine.data.redis.RedisRepositoryStateMachinePersist<S,E>
- Type Parameters:
S
- the type of stateE
- the type of event
- All Implemented Interfaces:
StateMachinePersist<S,
E, Object>
public class RedisRepositoryStateMachinePersist<S,E>
extends RepositoryStateMachinePersist<RedisRepositoryStateMachine,S,E>
Redis
based implementation of a RepositoryStateMachinePersist
.-
Constructor Summary
ConstructorDescriptionRedisRepositoryStateMachinePersist
(RedisStateMachineRepository redisStateMachineRepository) Instantiates a new redis repository state machine persist.RedisRepositoryStateMachinePersist
(RedisStateMachineRepository redisStateMachineRepository, StateMachineSerialisationService<S, E> serialisationService) Instantiates a new redis repository state machine persist. -
Method Summary
Modifier and TypeMethodDescriptionprotected RedisRepositoryStateMachine
build
(StateMachineContext<S, E> context, Object contextObj, byte[] serialisedContext) Builds the genericRepositoryStateMachine
entity.Gets the repository.Methods inherited from class org.springframework.statemachine.data.RepositoryStateMachinePersist
read, write
-
Constructor Details
-
RedisRepositoryStateMachinePersist
Instantiates a new redis repository state machine persist.- Parameters:
redisStateMachineRepository
- the redis state machine repository
-
RedisRepositoryStateMachinePersist
public RedisRepositoryStateMachinePersist(RedisStateMachineRepository redisStateMachineRepository, StateMachineSerialisationService<S, E> serialisationService) Instantiates a new redis repository state machine persist.- Parameters:
redisStateMachineRepository
- the redis state machine repositoryserialisationService
- the serialisation service
-
-
Method Details
-
getRepository
Description copied from class:RepositoryStateMachinePersist
Gets the repository.- Specified by:
getRepository
in classRepositoryStateMachinePersist<RedisRepositoryStateMachine,
S, E> - Returns:
- the repository
-
build
protected RedisRepositoryStateMachine build(StateMachineContext<S, E> context, Object contextObj, byte[] serialisedContext) Description copied from class:RepositoryStateMachinePersist
Builds the genericRepositoryStateMachine
entity.- Specified by:
build
in classRepositoryStateMachinePersist<RedisRepositoryStateMachine,
S, E> - Parameters:
context
- the contextcontextObj
- the context objserialisedContext
- the serialised context- Returns:
- the repository state machine entity
-