org.apache.cassandra.io

## Interface IVersionedSerializer<T>

- All Known Implementing Classes:
    AbstractBounds.AbstractBoundsSerializer, AntiEntropyService.TreeRequest.TreeRequestSerializer, AntiEntropyService.Validator.ValidatorSerializer, BootStrapper.StringSerializer, ColumnFamilySerializer, ColumnSlice.Serializer, DeletionInfo.Serializer, IDiskAtomFilter.Serializer, IntervalTree.Serializer, MerkleTree.MerkleTreeSerializer, MigrationManager.MigrationsSerializer, NamesQueryFilter.Serializer, PendingFile.PendingFileSerializer, RangeTombstoneList.Serializer, Row.RowSerializer, RowMutation.RowMutationSerializer, SliceQueryFilter.Serializer, TruncateResponse.TruncateResponseSerializer, UUIDSerializer, WriteResponse.WriteResponseSerializer

      public interface IVersionedSerializer<T>

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `deserialize(java.io.DataInput in, int version)` Deserialize into the specified DataInputStream instance.
    `void` | `serialize(T t, java.io.DataOutput 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,
                       java.io.DataOutput 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`

    - #### deserialize

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

      Deserialize into the specified DataInputStream instance.
      Parameters:
        `in` - DataInput from which deserialization needs to happen.
        `version` - protocol version
      Returns:
        the type that was deserialized
      Throws:
        `java.io.IOException`

    - #### 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

Copyright © 2014 The Apache Software Foundation