Make use of kryo more configurable
- Move away from thread local in favour of using kryo pooling. - New interface StateMachineSerialisationService with KryoStateMachineSerialisationService. - Try to work via constructors for instead of full blown configuration as it looks like this may give enough for users to customise. - Relates to #437
This commit is contained in:
@@ -18,6 +18,7 @@ package org.springframework.statemachine.data.jpa;
|
||||
import org.springframework.statemachine.StateMachineContext;
|
||||
import org.springframework.statemachine.data.RepositoryStateMachinePersist;
|
||||
import org.springframework.statemachine.data.StateMachineRepository;
|
||||
import org.springframework.statemachine.service.StateMachineSerialisationService;
|
||||
|
||||
/**
|
||||
* {@code JPA} based implementation of a {@link RepositoryStateMachinePersist}.
|
||||
@@ -41,6 +42,18 @@ public class JpaRepositoryStateMachinePersist<S, E> extends RepositoryStateMachi
|
||||
this.jpaStateMachineRepository = jpaStateMachineRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiates a new jpa repository state machine persist.
|
||||
*
|
||||
* @param jpaStateMachineRepository the jpa state machine repository
|
||||
* @param serialisationService the serialisation service
|
||||
*/
|
||||
public JpaRepositoryStateMachinePersist(JpaStateMachineRepository jpaStateMachineRepository,
|
||||
StateMachineSerialisationService<S, E> serialisationService) {
|
||||
super(serialisationService);
|
||||
this.jpaStateMachineRepository = jpaStateMachineRepository;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected StateMachineRepository<JpaRepositoryStateMachine> getRepository() {
|
||||
return jpaStateMachineRepository;
|
||||
|
||||
Reference in New Issue
Block a user