T
- The type of value to be serialized/deserializedpublic class SerializerDeserializer<T> extends Object
Modifier and Type | Field and Description |
---|---|
CustomSerializer<T> |
customSerializer
Custom serializer
|
T |
object
Reusable object of type T to avoid GC churn
|
Class<T> |
objectType
Class type information for the objects to serialize/deserialize
|
Constructor and Description |
---|
SerializerDeserializer(Class<T> objectType,
CustomSerializer<T> serializer)
Constructs a serializer/deserializer.
|
Modifier and Type | Method and Description |
---|---|
T |
deserialize(DataInputStream input)
Deserializes an object.
|
void |
serialize(DataOutputStream out,
T object)
Serializes an object.
|
public final Class<T> objectType
public final CustomSerializer<T> customSerializer
public T object
public SerializerDeserializer(Class<T> objectType, CustomSerializer<T> serializer)
objectType
- type of the objects for serialization/deserializationpublic T deserialize(DataInputStream input) throws IOException
input
- source input stream to read object fromIOException
- If there was an error while communicating with ScaleOut StateServerpublic void serialize(DataOutputStream out, T object) throws IOException
out
- destination output stream to write object toobject
- object to be serializedIOException
- If there was an error while communicating with ScaleOut StateServerCopyright (C) 2007-2014 ScaleOut Software, Inc.