Package org.apache.cassandra.utils
Class IntervalTree.Serializer<C extends java.lang.Comparable<? super C>,D,I extends Interval<C,D>>
- java.lang.Object
-
- org.apache.cassandra.utils.IntervalTree.Serializer<C,D,I>
-
- All Implemented Interfaces:
IVersionedAsymmetricSerializer<IntervalTree<C,D,I>,IntervalTree<C,D,I>>,IVersionedSerializer<IntervalTree<C,D,I>>
- Enclosing class:
- IntervalTree<C extends java.lang.Comparable<? super C>,D,I extends Interval<C,D>>
public static class IntervalTree.Serializer<C extends java.lang.Comparable<? super C>,D,I extends Interval<C,D>> extends java.lang.Object implements IVersionedSerializer<IntervalTree<C,D,I>>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntervalTree<C,D,I>deserialize(DataInputPlus in, int version)Deserialize an IntervalTree whose keys use the natural ordering.IntervalTree<C,D,I>deserialize(DataInputPlus in, int version, java.util.Comparator<C> comparator)voidserialize(IntervalTree<C,D,I> it, DataOutputPlus out, int version)Serialize the specified type into the specified DataOutputStream instance.longserializedSize(IntervalTree<C,D,I> it, int version)Calculate serialized size of object without actually serializing.
-
-
-
Method Detail
-
serialize
public void serialize(IntervalTree<C,D,I> it, 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<C extends java.lang.Comparable<? super C>,D>- Parameters:
it- 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 IntervalTree<C,D,I> deserialize(DataInputPlus in, int version) throws java.io.IOException
Deserialize an IntervalTree whose keys use the natural ordering. Use deserialize(DataInput, int, Comparator) instead if the interval tree is to use a custom comparator, as the comparator is *not* serialized.- Specified by:
deserializein interfaceIVersionedAsymmetricSerializer<C extends java.lang.Comparable<? super C>,D>- 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
-
deserialize
public IntervalTree<C,D,I> deserialize(DataInputPlus in, int version, java.util.Comparator<C> comparator) throws java.io.IOException
- Throws:
java.io.IOException
-
serializedSize
public long serializedSize(IntervalTree<C,D,I> it, int version)
Description copied from interface:IVersionedAsymmetricSerializerCalculate serialized size of object without actually serializing.- Specified by:
serializedSizein interfaceIVersionedAsymmetricSerializer<C extends java.lang.Comparable<? super C>,D>- Parameters:
it- object to calculate serialized sizeversion- protocol version- Returns:
- serialized size of object t
-
-