public abstract class ForwardingVersionedSerializer<T> extends java.lang.Object implements IVersionedSerializer<T>
| Modifier | Constructor and Description | 
|---|---|
| protected  | ForwardingVersionedSerializer() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected abstract IVersionedSerializer<T> | delegate(int version)Returns the backing delegate instance that methods are forwarded to. | 
| T | deserialize(DataInputPlus in,
           int version)Deserialize into the specified DataInputStream instance. | 
| void | serialize(T t,
         DataOutputPlus out,
         int version)Serialize the specified type into the specified DataOutputStream instance. | 
| long | serializedSize(T t,
              int version)Calculate serialized size of object without actually serializing. | 
protected abstract IVersionedSerializer<T> delegate(int version)
version - the server versionpublic void serialize(T t, DataOutputPlus out, int version) throws java.io.IOException
IVersionedSerializerserialize in interface IVersionedSerializer<T>t - type that needs to be serializedout - DataOutput into which serialization needs to happen.version - protocol versionjava.io.IOException - if serialization failspublic T deserialize(DataInputPlus in, int version) throws java.io.IOException
IVersionedSerializerdeserialize in interface IVersionedSerializer<T>in - DataInput from which deserialization needs to happen.version - protocol versionjava.io.IOException - if deserialization failspublic long serializedSize(T t, int version)
IVersionedSerializerserializedSize in interface IVersionedSerializer<T>t - object to calculate serialized sizeversion - protocol versionCopyright © 2018 The Apache Software Foundation