Class WindowKryoSerializer

java.lang.Object
org.apache.storm.trident.windowing.WindowKryoSerializer

public class WindowKryoSerializer extends Object
Kryo serializer/deserializer for values that are stored as part of windowing. This can be used in WindowsStore. This class is not thread safe.
  • Constructor Details

    • WindowKryoSerializer

      public WindowKryoSerializer(Map<String,Object> topoConf)
  • Method Details

    • serialize

      public byte[] serialize(Object obj)
      Serializes the given object into a byte array using Kryo serialization.
      Parameters:
      obj - Object to be serialized.
    • serializeToByteBuffer

      public ByteBuffer serializeToByteBuffer(Object obj)
      Serializes the given object into a ByteBuffer backed by the byte array returned by Kryo serialization.
      Parameters:
      obj - Object to be serialized.
    • deserialize

      public Object deserialize(byte[] buff)
      Returns an Object which is created using Kryo deserialization of given byte array instance.
      Parameters:
      buff - byte array to be deserialized into an Object
    • deserialize

      public Object deserialize(ByteBuffer byteBuffer)
      Returns an Object which is created using Kryo deserialization of given byteBuffer instance.
      Parameters:
      byteBuffer - byte buffer to be deserialized into an Object