Class KryoStateMachineSerialisationService<S,E>
java.lang.Object
org.springframework.statemachine.kryo.AbstractKryoStateMachineSerialisationService<S,E>
org.springframework.statemachine.kryo.KryoStateMachineSerialisationService<S,E>
- Type Parameters:
S- the type of stateE- the type of event
- All Implemented Interfaces:
StateMachineSerialisationService<S,E>
public class KryoStateMachineSerialisationService<S,E>
extends AbstractKryoStateMachineSerialisationService<S,E>
Implementation for
StateMachineSerialisationService using kryo.-
Field Summary
Fields inherited from class org.springframework.statemachine.kryo.AbstractKryoStateMachineSerialisationService
pool -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigureKryoInstance(com.esotericsoftware.kryo.Kryo kryo) Subclasses implement this to configure the kryo instance.protected <T> TdoDecode(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, Class<T> type) Subclasses implement this method to decode with Kryo.protected voiddoEncode(com.esotericsoftware.kryo.Kryo kryo, Object object, com.esotericsoftware.kryo.io.Output output) Subclasses implement this method to encode with Kryo.Methods inherited from class org.springframework.statemachine.kryo.AbstractKryoStateMachineSerialisationService
deserialiseStateMachineContext, serialiseStateMachineContext
-
Constructor Details
-
KryoStateMachineSerialisationService
public KryoStateMachineSerialisationService()
-
-
Method Details
-
doEncode
protected void doEncode(com.esotericsoftware.kryo.Kryo kryo, Object object, com.esotericsoftware.kryo.io.Output output) Description copied from class:AbstractKryoStateMachineSerialisationServiceSubclasses implement this method to encode with Kryo.- Specified by:
doEncodein classAbstractKryoStateMachineSerialisationService<S,E> - Parameters:
kryo- the Kryo instanceobject- the object to encodeoutput- the Kryo Output instance
-
doDecode
protected <T> T doDecode(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, Class<T> type) Description copied from class:AbstractKryoStateMachineSerialisationServiceSubclasses implement this method to decode with Kryo.- Specified by:
doDecodein classAbstractKryoStateMachineSerialisationService<S,E> - Type Parameters:
T- the type for decoded object- Parameters:
kryo- the Kryo instanceinput- the Kryo Input instancetype- the class of the decoded object- Returns:
- the decoded object
-
configureKryoInstance
protected void configureKryoInstance(com.esotericsoftware.kryo.Kryo kryo) Description copied from class:AbstractKryoStateMachineSerialisationServiceSubclasses implement this to configure the kryo instance. This is invoked on each new Kryo instance when it is created.- Specified by:
configureKryoInstancein classAbstractKryoStateMachineSerialisationService<S,E> - Parameters:
kryo- the kryo instance
-