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 inWindowsStore
. This class is not thread safe.
-
-
Constructor Summary
Constructors Constructor Description WindowKryoSerializer(Map<String,Object> topoConf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 givenbyteBuffer
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 aByteBuffer
backed by the byte array returned by Kryo serialization.
-
-
-
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 aByteBuffer
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 givenbyteBuffer
instance.- Parameters:
byteBuffer
- byte buffer to be deserialized into an Object
-
-