T - The type of event that this serializes.public interface Serializer<T>
NOTE: There is no need for implementations to implement any sort of "framing"; the byte buffers passed to deserialize will be of the appropriate length.
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_EVENT_SIZE
The maximum event size, in bytes.
|
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(java.nio.ByteBuffer serializedValue)
Deserializes the given ByteBuffer into an event.
|
java.nio.ByteBuffer |
serialize(T value)
Serializes the given event.
|
static final int MAX_EVENT_SIZE
java.nio.ByteBuffer serialize(T value)
value - The event to be serialized.MAX_EVENT_SIZE.T deserialize(java.nio.ByteBuffer serializedValue)
serializedValue - A event that has been previously serialized.