Class IntervalTree.Serializer<C extends java.lang.Comparable<? super C>,​D,​I extends Interval<C,​D>>

    • Method Detail

      • serialize

        public void serialize​(IntervalTree<C,​D,​I> it,
                              DataOutputPlus out,
                              int version)
                       throws java.io.IOException
        Description copied from interface: IVersionedAsymmetricSerializer
        Serialize the specified type into the specified DataOutputStream instance.
        Specified by:
        serialize in interface IVersionedAsymmetricSerializer<C extends java.lang.Comparable<? super C>,​D>
        Parameters:
        it - 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

        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:
        deserialize in interface IVersionedAsymmetricSerializer<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: IVersionedAsymmetricSerializer
        Calculate serialized size of object without actually serializing.
        Specified by:
        serializedSize in interface IVersionedAsymmetricSerializer<C extends java.lang.Comparable<? super C>,​D>
        Parameters:
        it - object to calculate serialized size
        version - protocol version
        Returns:
        serialized size of object t