Class KryoStateMachineSerialisationDefaults
java.lang.Object
org.springframework.statemachine.kryo.KryoStateMachineSerialisationDefaults
Static helper that applies the safe-by-default configuration used by Spring
Statemachine's Kryo-based persistence: enables
registrationRequired=true and
registers the concrete framework and JDK types known to be written through
StateMachineContextSerializer.
Applications that use custom state or event types (typically enums) need to
register those types as well. For Spring-Boot or annotation-config usage this
is done by subclassing KryoStateMachineSerialisationService and
overriding
AbstractKryoStateMachineSerialisationService.configureKryoInstance(Kryo).
For the spring-statemachine-data-redis and
spring-statemachine-zookeeper backends, a Consumer<Kryo>
constructor parameter is provided.- Since:
- 4.0.2
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidregisterDefaults(com.esotericsoftware.kryo.Kryo kryo) Apply the safe-by-default configuration to the supplied Kryo instance.
-
Method Details
-
registerDefaults
public static void registerDefaults(com.esotericsoftware.kryo.Kryo kryo) Apply the safe-by-default configuration to the supplied Kryo instance.- Parameters:
kryo- the Kryo instance to configure
-