org.apache.cassandra.dht

## Interface IPartitionerDependentSerializer<T>

All Known Implementing Classes:
  AbstractBounds.AbstractBoundsSerializer, PartitionPosition.RowPositionSerializer, Token.TokenSerializer

    public interface IPartitionerDependentSerializer<T>

Versioned serializer where the serialization depends on partitioner. On serialization the partitioner is given by the entity being serialized. To deserialize the partitioner used must be known to the calling method.

### Method Summary

All Methods Instance Methods Abstract Methods
`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.

### Method Detail

#### serialize

    void serialize(T t,
                   DataOutputPlus out,
                   int version)
            throws java.io.IOException

Serialize the specified type into the specified DataOutputStream instance.

Parameters:
  `t` - type that needs to be serialized
  `out` - DataOutput into which serialization needs to happen.
  `version` - protocol version
Throws:
  `java.io.IOException` - if serialization fails

#### deserialize

    T deserialize(java.io.DataInput in,
                  IPartitioner p,
                  int version)
           throws java.io.IOException

Deserialize into the specified DataInputStream instance.

Parameters:
  `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 version
Returns:
  the type that was deserialized
Throws:
  `java.io.IOException` - if deserialization fails

#### serializedSize

    long serializedSize(T t,
                        int version)

Calculate serialized size of object without actually serializing.

Parameters:
  `t` - object to calculate serialized size
  `version` - protocol version
Returns:
  serialized size of object t