public class CatalystSerializableSerializer<T extends CatalystSerializable> extends Object implements TypeSerializer<T>
TypeSerializer implementation that handles serialization for CatalystSerializable objects.
During deserialization, if the serializable type also implements ReferenceCounted then the serializer will
make an effort to use a ReferencePool rather than constructing new objects. However, this requires that
ReferenceCounted types provide a single argument ReferenceManager constructor. If an object is
ReferenceCounted and does not provide a ReferenceManager constructor then a SerializationException
will be thrown.
| Constructor and Description |
|---|
CatalystSerializableSerializer() |
| Modifier and Type | Method and Description |
|---|---|
T |
read(Class<T> type,
BufferInput buffer,
Serializer serializer)
Reads the object from the given buffer.
|
void |
write(T object,
BufferOutput buffer,
Serializer serializer)
Writes the object to the given buffer.
|
public void write(T object, BufferOutput buffer, Serializer serializer)
TypeSerializerwrite in interface TypeSerializer<T extends CatalystSerializable>object - The object to write.buffer - The buffer to which to write the object.serializer - The Catalyst serializer.public T read(Class<T> type, BufferInput buffer, Serializer serializer)
TypeSerializerread in interface TypeSerializer<T extends CatalystSerializable>type - The type to read.buffer - The buffer from which to read the object.serializer - The Catalyst serializer.Copyright © 2013–2015. All rights reserved.