public interface IPartitionerDependentSerializer<T>
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(java.io.DataInput in,
IPartitioner p,
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.
|
void serialize(T t, DataOutputPlus out, int version) throws java.io.IOException
t - type that needs to be serializedout - DataOutput into which serialization needs to happen.version - protocol versionjava.io.IOException - if serialization failsT deserialize(java.io.DataInput in, IPartitioner p, int version) throws java.io.IOException
in - DataInput from which deserialization needs to happen.p - Partitioner that will be used to construct tokens. Needs to match the partitioner that was used to
serialize the token.version - protocol versionjava.io.IOException - if deserialization failslong serializedSize(T t, int version)
t - object to calculate serialized sizeversion - protocol versionCopyright © 2016 The Apache Software Foundation