public class DefaultStateSerializer<T> extends Object implements Serializer<T>
A default implementation that uses Kryo to serialize and de-serialize the state.
Constructor and Description |
---|
DefaultStateSerializer() |
DefaultStateSerializer(Map<String,Object> topoConf,
TopologyContext context) |
DefaultStateSerializer(Map<String,Object> topoConf,
TopologyContext context,
List<Class<?>> classesToRegister)
Constructs a
DefaultStateSerializer instance with the given list of classes registered in kryo. |
public DefaultStateSerializer(Map<String,Object> topoConf, TopologyContext context, List<Class<?>> classesToRegister)
Constructs a DefaultStateSerializer
instance with the given list of classes registered in kryo.
classesToRegister
- the classes to register.public DefaultStateSerializer(Map<String,Object> topoConf, TopologyContext context)
public DefaultStateSerializer()
public byte[] serialize(T obj)
serialize
in interface Serializer<T>
public T deserialize(byte[] b)
deserialize
in interface Serializer<T>
Copyright © 2022 The Apache Software Foundation. All rights reserved.