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.- Author:
- Janne Valkealahti
-
Field Summary
Fields inherited from class org.springframework.statemachine.kryo.AbstractKryoStateMachineSerialisationService
pool
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
configureKryoInstance
(com.esotericsoftware.kryo.Kryo kryo) Subclasses implement this to configure the kryo instance.protected <T> T
doDecode
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input, Class<T> type) Subclasses implement this method to decode with Kryo.protected void
doEncode
(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:AbstractKryoStateMachineSerialisationService
Subclasses implement this method to encode with Kryo.- Specified by:
doEncode
in 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:AbstractKryoStateMachineSerialisationService
Subclasses implement this method to decode with Kryo.- Specified by:
doDecode
in 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:AbstractKryoStateMachineSerialisationService
Subclasses implement this to configure the kryo instance. This is invoked on each new Kryo instance when it is created.- Specified by:
configureKryoInstance
in classAbstractKryoStateMachineSerialisationService<S,
E> - Parameters:
kryo
- the kryo instance
-