Package org.apache.cassandra.io
Interface IVersionedAsymmetricSerializer<In,Out>
- All Known Subinterfaces:
IVersionedSerializer<T>
- All Known Implementing Classes:
Ballot.Serializer,Batch.Serializer,BooleanSerializer,CassandraStreamHeader.CassandraStreamHeaderSerializer,Commit.CommitSerializer,CounterMutation.CounterMutationSerializer,GossipShutdown.Serializer,HintMessage.Serializer,InetAddressAndPort.FwdFrmSerializer,InetAddressAndPort.Serializer,Int32Serializer,Int64Serializer,MerkleTrees.MerkleTreesSerializer,Mutation.MutationSerializer,PaxosCommitAndPrepare.RequestSerializer,PaxosPrepare.RequestSerializer,PaxosPrepare.ResponseSerializer,PaxosPrepareRefresh.RequestSerializer,PaxosPrepareRefresh.ResponseSerializer,PaxosPropose.RequestSerializer,PaxosPropose.ResponseSerializer,PaxosRepair.RequestSerializer,PaxosRepair.ResponseSerializer,PaxosStartPrepareCleanup.RequestSerializer,PrepareResponse.PrepareResponseSerializer,RangesSerializer,ReadCommand.Serializer,RequestFailureReason.Serializer,SchemaMutationsSerializer,StreamRequest.StreamRequestSerializer,StreamSummary.StreamSummarySerializer,SyncNodePair.NodePairSerializer,TimeUUID.Serializer,TruncateResponse.TruncateResponseSerializer,UUIDSerializer,VoidSerializer
public interface IVersionedAsymmetricSerializer<In,Out>
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize(DataInputPlus in, int version) Deserialize into the specified DataInputStream instance.voidserialize(In t, DataOutputPlus out, int version) Serialize the specified type into the specified DataOutputStream instance.longserializedSize(In t, int version) Calculate serialized size of object without actually serializing.
-
Method Details
-
serialize
Serialize the specified type into the specified DataOutputStream instance.- Parameters:
t- type that needs to be serializedout- DataOutput into which serialization needs to happen.version- protocol version- Throws:
IOException- if serialization fails
-
deserialize
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:
IOException- if deserialization fails
-
serializedSize
Calculate serialized size of object without actually serializing.- Parameters:
t- object to calculate serialized sizeversion- protocol version- Returns:
- serialized size of object t
-