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 and Description |
---|
WindowKryoSerializer(Map<String,Object> topoConf) |
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. |
public byte[] serialize(Object obj)
Serializes the given object into a byte array using Kryo serialization.
obj
- Object to be serialized.public ByteBuffer serializeToByteBuffer(Object obj)
Serializes the given object into a ByteBuffer
backed by the byte array returned by Kryo serialization.
obj
- Object to be serialized.public Object deserialize(byte[] buff)
Returns an Object which is created using Kryo deserialization of given byte array instance.
buff
- byte array to be deserialized into an Objectpublic Object deserialize(ByteBuffer byteBuffer)
Returns an Object which is created using Kryo deserialization of given byteBuffer
instance.
byteBuffer
- byte buffer to be deserialized into an ObjectCopyright © 2022 The Apache Software Foundation. All rights reserved.