Class FD_SOCK.BroadcastTask

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

    protected class FD_SOCK.BroadcastTask
    extends java.lang.Object
    implements java.lang.Runnable
    Task that periodically broadcasts a list of suspected members to the group. Goal is not to lose a SUSPECT message: since these are bcast 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 Detail

      • suspects

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

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

      • BroadcastTask

        protected BroadcastTask()
    • Method Detail

      • addSuspectedMember

        protected void addSuspectedMember​(Address mbr)
        Adds a suspected member. Starts the task if not yet running
      • removeSuspectedMember

        protected void removeSuspectedMember​(Address suspected_mbr)
      • removeAll

        protected void removeAll()
      • startTask

        protected void startTask()
      • stopTask

        protected void stopTask()
      • adjustSuspectedMembers

        protected void adjustSuspectedMembers​(java.util.List<Address> new_mbrship)
        Removes all elements from suspected_mbrs that are not in the new membership
      • 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