Package org.apache.cassandra.utils
Class MerkleTrees.MerkleTreesSerializer
- java.lang.Object
-
- org.apache.cassandra.utils.MerkleTrees.MerkleTreesSerializer
-
- All Implemented Interfaces:
IVersionedAsymmetricSerializer<MerkleTrees,MerkleTrees>,IVersionedSerializer<MerkleTrees>
- Enclosing class:
- MerkleTrees
public static class MerkleTrees.MerkleTreesSerializer extends java.lang.Object implements IVersionedSerializer<MerkleTrees>
-
-
Constructor Summary
Constructors Constructor Description MerkleTreesSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MerkleTreesdeserialize(DataInputPlus in, int version)Deserialize into the specified DataInputStream instance.voidserialize(MerkleTrees trees, DataOutputPlus out, int version)Serialize the specified type into the specified DataOutputStream instance.longserializedSize(MerkleTrees trees, int version)Calculate serialized size of object without actually serializing.
-
-
-
Method Detail
-
serialize
public void serialize(MerkleTrees trees, DataOutputPlus out, int version) throws java.io.IOException
Description copied from interface:IVersionedAsymmetricSerializerSerialize the specified type into the specified DataOutputStream instance.- Specified by:
serializein interfaceIVersionedAsymmetricSerializer<MerkleTrees,MerkleTrees>- Parameters:
trees- type that needs to be serializedout- DataOutput into which serialization needs to happen.version- protocol version- Throws:
java.io.IOException- if serialization fails
-
deserialize
public MerkleTrees deserialize(DataInputPlus in, int version) throws java.io.IOException
Description copied from interface:IVersionedAsymmetricSerializerDeserialize into the specified DataInputStream instance.- Specified by:
deserializein interfaceIVersionedAsymmetricSerializer<MerkleTrees,MerkleTrees>- Parameters:
in- DataInput from which deserialization needs to happen.version- protocol version- Returns:
- the type that was deserialized
- Throws:
java.io.IOException- if deserialization fails
-
serializedSize
public long serializedSize(MerkleTrees trees, int version)
Description copied from interface:IVersionedAsymmetricSerializerCalculate serialized size of object without actually serializing.- Specified by:
serializedSizein interfaceIVersionedAsymmetricSerializer<MerkleTrees,MerkleTrees>- Parameters:
trees- object to calculate serialized sizeversion- protocol version- Returns:
- serialized size of object t
-
-