Class Seqno

  • Direct Known Subclasses:
    SeqnoRange

    public class Seqno
    extends java.lang.Object
    Keeps track of a single message to retransmit
    Author:
    Bela Ban
    • Constructor Detail

      • Seqno

        public Seqno​(long low)
      • Seqno

        public Seqno​(long num,
                     boolean dummy)
        Only used to compare a long against a range in a TreeSet / TreeMap. Used to find a range given a seqno
        Parameters:
        num -
        dummy -
    • Method Detail

      • isDummy

        public boolean isDummy()
      • getLow

        public long getLow()
      • contains

        public boolean contains​(long num)
      • get

        public boolean get​(long num)
      • set

        public void set​(long num)
      • clear

        public void clear​(long num)
      • getNumberOfReceivedMessages

        public int getNumberOfReceivedMessages()
      • getNumberOfMissingMessages

        public int getNumberOfMissingMessages()
      • size

        public int size()
      • getMessagesToRetransmit

        public java.util.Collection<Range> getMessagesToRetransmit()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • print

        public java.lang.String print()
      • received

        protected boolean received()