voldemort.serialization
Interface Serializer<T>

Type Parameters:
T - The type of the object that is mapped by this serializer
All Known Implementing Classes:
AvroGenericSerializer, AvroReflectiveSerializer, AvroSpecificSerializer, AvroVersionedGenericSerializer, ByteArraySerializer, IdentitySerializer, JsonTypeSerializer, ObjectSerializer, ProtoBufSerializer, SlopSerializer, StringSerializer, ThriftSerializer, VersionedSerializer

public interface Serializer<T>

Map objects to byte arrays and back again


Method Summary
 byte[] toBytes(T object)
          Construct an array of bytes from the given object
 T toObject(byte[] bytes)
          Create an object from an array of bytes
 

Method Detail

toBytes

byte[] toBytes(T object)
Construct an array of bytes from the given object

Parameters:
object - The object
Returns:
The bytes taken from the object

toObject

T toObject(byte[] bytes)
Create an object from an array of bytes

Parameters:
bytes - An array of bytes with the objects data
Returns:
A java object serialzed from the bytes


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu