Class FD_SOCK2.BroadcastTask

  • All Implemented Interfaces:
    java.lang.Runnable
    Enclosing class:
    FD_SOCK2

    protected class FD_SOCK2.BroadcastTask
    extends java.lang.Object
    implements java.lang.Runnable
    Task which periodically broadcasts a list of suspected members. The goal is not to lose a SUSPECT message: since these are broadcast unreliably, they might get dropped. The BroadcastTask makes sure they are retransmitted until a view has been received which doesn't contain the suspected members any longer. Then the task terminates.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.concurrent.Future<?> future  
      protected java.util.Set<Address> suspects  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BroadcastTask()  
    • Field Detail

      • suspects

        protected final java.util.Set<Address> suspects
      • future

        protected java.util.concurrent.Future<?> future
    • Constructor Detail

      • BroadcastTask

        protected BroadcastTask()
    • Method Detail

      • addSuspects

        protected void addSuspects​(java.util.List<Address> mbrs)
      • removeSuspect

        protected void removeSuspect​(Address suspect)
      • adjustSuspects

        protected void adjustSuspects​(java.util.List<Address> mbrs)
        Removes all elements from suspects that are not in the new membership
      • clear

        protected void clear()
      • startTask

        protected void startTask()
      • stopTask

        protected void stopTask()
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • toString

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