Package org.apache.storm.state
Class DefaultStateSerializer<T>
java.lang.Object
org.apache.storm.state.DefaultStateSerializer<T>
- All Implemented Interfaces:
Serializable
,Serializer<T>
A default implementation that uses Kryo to serialize and de-serialize the state.
- See Also:
-
Constructor Summary
ConstructorDescriptionDefaultStateSerializer
(Map<String, Object> topoConf, TopologyContext context) DefaultStateSerializer
(Map<String, Object> topoConf, TopologyContext context, List<Class<?>> classesToRegister) Constructs aDefaultStateSerializer
instance with the given list of classes registered in kryo. -
Method Summary
-
Constructor Details
-
DefaultStateSerializer
public DefaultStateSerializer(Map<String, Object> topoConf, TopologyContext context, List<Class<?>> classesToRegister) Constructs aDefaultStateSerializer
instance with the given list of classes registered in kryo.- Parameters:
classesToRegister
- the classes to register.
-
DefaultStateSerializer
-
DefaultStateSerializer
public DefaultStateSerializer()
-
-
Method Details
-
serialize
- Specified by:
serialize
in interfaceSerializer<T>
-
deserialize
- Specified by:
deserialize
in interfaceSerializer<T>
-