Class MongoDbRepositoryStateMachinePersist<S,E>
java.lang.Object
org.springframework.statemachine.data.RepositoryStateMachinePersist<MongoDbRepositoryStateMachine,S,E>
org.springframework.statemachine.data.mongodb.MongoDbRepositoryStateMachinePersist<S,E>
- Type Parameters:
S
- the type of stateE
- the type of event
- All Implemented Interfaces:
StateMachinePersist<S,
E, Object>
public class MongoDbRepositoryStateMachinePersist<S,E>
extends RepositoryStateMachinePersist<MongoDbRepositoryStateMachine,S,E>
MongoDb
based implementation of a RepositoryStateMachinePersist
.- Author:
- Janne Valkealahti
-
Constructor Summary
ConstructorDescriptionMongoDbRepositoryStateMachinePersist
(MongoDbStateMachineRepository mongodbStateMachineRepository) Instantiates a new mongodb repository state machine persist.MongoDbRepositoryStateMachinePersist
(MongoDbStateMachineRepository mongodbStateMachineRepository, StateMachineSerialisationService<S, E> serialisationService) Instantiates a new mongodb repository state machine persist. -
Method Summary
Modifier and TypeMethodDescriptionprotected MongoDbRepositoryStateMachine
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
-
MongoDbRepositoryStateMachinePersist
public MongoDbRepositoryStateMachinePersist(MongoDbStateMachineRepository mongodbStateMachineRepository) Instantiates a new mongodb repository state machine persist.- Parameters:
mongodbStateMachineRepository
- the mongodb state machine repository
-
MongoDbRepositoryStateMachinePersist
public MongoDbRepositoryStateMachinePersist(MongoDbStateMachineRepository mongodbStateMachineRepository, StateMachineSerialisationService<S, E> serialisationService) Instantiates a new mongodb repository state machine persist.- Parameters:
mongodbStateMachineRepository
- the mongodb state machine repositoryserialisationService
- the serialisation service
-
-
Method Details
-
getRepository
Description copied from class:RepositoryStateMachinePersist
Gets the repository.- Specified by:
getRepository
in classRepositoryStateMachinePersist<MongoDbRepositoryStateMachine,
S, E> - Returns:
- the repository
-
build
protected MongoDbRepositoryStateMachine build(StateMachineContext<S, E> context, Object contextObj, byte[] serialisedContext) Description copied from class:RepositoryStateMachinePersist
Builds the genericRepositoryStateMachine
entity.- Specified by:
build
in classRepositoryStateMachinePersist<MongoDbRepositoryStateMachine,
S, E> - Parameters:
context
- the contextcontextObj
- the context objserialisedContext
- the serialised context- Returns:
- the repository state machine entity
-