org.apache.storm.trident.windowing

## 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 Summary

    Constructors
    Constructor and Description
    `WindowKryoSerializer(Map<String,Object> topoConf)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `deserialize(byte[] buff)` Returns an Object which is created using Kryo deserialization of given byte array instance.
    `Object` | `deserialize(ByteBuffer byteBuffer)` Returns an Object which is created using Kryo deserialization of given `byteBuffer` instance.
    `byte[]` | `serialize(Object obj)` Serializes the given object into a byte array using Kryo serialization.
    `ByteBuffer` | `serializeToByteBuffer(Object obj)` Serializes the given object into a `ByteBuffer` backed by the byte array returned by Kryo serialization.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### WindowKryoSerializer

          public WindowKryoSerializer(Map<String,Object> topoConf)

  - ### Method Detail

    - #### 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

Copyright © 2019 The Apache Software Foundation. All rights reserved.