Package io.pravega.client.watermark
Class WatermarkSerializer
- java.lang.Object
-
- io.pravega.client.watermark.WatermarkSerializer
-
- All Implemented Interfaces:
Serializer<io.pravega.shared.watermarks.Watermark>
public class WatermarkSerializer extends java.lang.Object implements Serializer<io.pravega.shared.watermarks.Watermark>
-
-
Field Summary
-
Fields inherited from interface io.pravega.client.stream.Serializer
MAX_EVENT_SIZE
-
-
Constructor Summary
Constructors Constructor Description WatermarkSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.pravega.shared.watermarks.Watermark
deserialize(java.nio.ByteBuffer serializedValue)
Deserializes the given ByteBuffer into an event.java.nio.ByteBuffer
serialize(io.pravega.shared.watermarks.Watermark value)
Serializes the given event.
-
-
-
Method Detail
-
serialize
public java.nio.ByteBuffer serialize(io.pravega.shared.watermarks.Watermark value)
Description copied from interface:Serializer
Serializes the given event.- Specified by:
serialize
in interfaceSerializer<io.pravega.shared.watermarks.Watermark>
- Parameters:
value
- The event to be serialized.- Returns:
- The serialized form of the event.
NOTE: buffers returned should not exceed
Serializer.MAX_EVENT_SIZE
.
-
deserialize
public io.pravega.shared.watermarks.Watermark deserialize(java.nio.ByteBuffer serializedValue)
Description copied from interface:Serializer
Deserializes the given ByteBuffer into an event.- Specified by:
deserialize
in interfaceSerializer<io.pravega.shared.watermarks.Watermark>
- Parameters:
serializedValue
- A event that has been previously serialized.- Returns:
- The event object.
-
-