Class AckCollector


  • public class AckCollector
    extends java.lang.Object
    Collects acks from a number of nodes, waits for all acks. Can also be time bounded
    Author:
    Bela Ban
    • Field Detail

      • missing_acks

        protected final java.util.List<Address> missing_acks
        List of members from whom we haven't received an ACK yet
      • all_acks_received

        protected final Promise<java.lang.Boolean> all_acks_received
    • Constructor Detail

      • AckCollector

        public AckCollector()
      • AckCollector

        public AckCollector​(java.util.Collection<Address> members)
      • AckCollector

        public AckCollector​(Address... members)
    • Method Detail

      • reset

        public void reset​(java.util.Collection<Address> members)
      • destroy

        public void destroy()
      • size

        public int size()
      • expectedAcks

        public int expectedAcks()
      • ack

        public void ack​(Address member)
      • ack

        public void ack​(Address... members)
      • ack

        public void ack​(java.util.Collection<Address> members)
      • suspect

        public void suspect​(Address member)
      • suspect

        public void suspect​(Address... members)
      • suspect

        public void suspect​(java.util.Collection<Address> members)
      • retainAll

        public boolean retainAll​(java.util.Collection<Address> members)
      • waitForAllAcks

        public boolean waitForAllAcks()
      • waitForAllAcks

        public boolean waitForAllAcks​(long timeout)
                               throws java.util.concurrent.TimeoutException
        Throws:
        java.util.concurrent.TimeoutException
      • toString

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

        public java.lang.String printMissing()
      • addAll

        protected void addAll​(Address... members)
      • addAll

        protected void addAll​(java.util.Collection<Address> members)
      • addAll

        protected void addAll​(java.util.Collection<Address> members,
                              java.util.Collection<Address> exclude)
      • addAll

        protected void addAll​(java.util.Collection<Address> members,
                              Address... exclude)