Package com.linkedin.venice.serializer
Interface RecordSerializer<T>
-
- All Known Implementing Classes:
AvroSerializer
,FastAvroSerializer
,MapOrderPreservingFastSerializer
,MapOrderPreservingSerializer
,VsonAvroGenericSerializer
public interface RecordSerializer<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
serialize(T object)
byte[]
serializeObjects(java.lang.Iterable<T> objects)
byte[]
serializeObjects(java.lang.Iterable<T> objects, java.nio.ByteBuffer prefix)
Serialize a list of objects and put the prefix before the serialized objects.
-
-
-
Method Detail
-
serialize
byte[] serialize(T object) throws VeniceException
- Throws:
VeniceException
-
serializeObjects
byte[] serializeObjects(java.lang.Iterable<T> objects) throws VeniceException
- Throws:
VeniceException
-
serializeObjects
byte[] serializeObjects(java.lang.Iterable<T> objects, java.nio.ByteBuffer prefix) throws VeniceException
Serialize a list of objects and put the prefix before the serialized objects. This function could avoid unnecessary byte array copy when you want to serialize two different kinds of objects together. Essentially, the {@param prefix} will be the serialized byte array of the first kind of objects.- Parameters:
objects
-prefix
-- Returns:
- Throws:
VeniceException
-
-