Class AckTable


  • public class AckTable
    extends java.lang.Object
    Manages ACKs from receivers in NAKACK4
    Since:
    5.4
    Author:
    Bela Ban
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Map<Address,​java.lang.Long> acks  
      protected java.util.concurrent.locks.Lock lock  
      protected long min  
    • Constructor Summary

      Constructors 
      Constructor Description
      AckTable()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long ack​(Address sender, long seqno)
      Adds an ACK from a sender to the map.
      AckTable adjust​(java.util.List<Address> mbrs)
      Removes left members from and adds new members to the map
      AckTable clear()  
      protected long computeMin()  
      long min()  
      int size()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • acks

        protected final java.util.Map<Address,​java.lang.Long> acks
      • lock

        protected final java.util.concurrent.locks.Lock lock
      • min

        protected volatile long min
    • Constructor Detail

      • AckTable

        public AckTable()
    • Method Detail

      • min

        public long min()
      • ack

        public long ack​(Address sender,
                        long seqno)
        Adds an ACK from a sender to the map. Returns the new minimum
      • adjust

        public AckTable adjust​(java.util.List<Address> mbrs)
        Removes left members from and adds new members to the map
      • size

        public int size()
      • toString

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

        protected long computeMin()