public static class AbstractBounds.AbstractBoundsSerializer<T extends RingPosition<T>> extends java.lang.Object implements IPartitionerDependentSerializer<AbstractBounds<T>>
Constructor and Description |
---|
AbstractBoundsSerializer(IPartitionerDependentSerializer<T> serializer) |
Modifier and Type | Method and Description |
---|---|
AbstractBounds<T> |
deserialize(java.io.DataInput in,
IPartitioner p,
int version)
Deserialize into the specified DataInputStream instance.
|
void |
serialize(AbstractBounds<T> range,
DataOutputPlus out,
int version)
Serialize the specified type into the specified DataOutputStream instance.
|
long |
serializedSize(AbstractBounds<T> ab,
int version)
Calculate serialized size of object without actually serializing.
|
public AbstractBoundsSerializer(IPartitionerDependentSerializer<T> serializer)
public void serialize(AbstractBounds<T> range, DataOutputPlus out, int version) throws java.io.IOException
IPartitionerDependentSerializer
serialize
in interface IPartitionerDependentSerializer<AbstractBounds<T extends RingPosition<T>>>
range
- type that needs to be serializedout
- DataOutput into which serialization needs to happen.version
- protocol versionjava.io.IOException
- if serialization failspublic AbstractBounds<T> deserialize(java.io.DataInput in, IPartitioner p, int version) throws java.io.IOException
IPartitionerDependentSerializer
deserialize
in interface IPartitionerDependentSerializer<AbstractBounds<T extends RingPosition<T>>>
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 failspublic long serializedSize(AbstractBounds<T> ab, int version)
IPartitionerDependentSerializer
serializedSize
in interface IPartitionerDependentSerializer<AbstractBounds<T extends RingPosition<T>>>
ab
- object to calculate serialized sizeversion
- protocol versionCopyright © 2009-2022 The Apache Software Foundation