Class FD_ALL

All Implemented Interfaces:
Lifecycle

public class FD_ALL extends FailureDetection
Failure detection based on simple heartbeat protocol. Every member periodically multicasts a heartbeat. Every member also maintains a table of all members (minus itself). When data or a heartbeat from P is received, we reset the timestamp for P to the current time. Periodically, we check for expired members, and suspect those.

Reduced number of messages exchanged on suspect event: https://issues.redhat.com/browse/JGRP-1241

  • Field Details

    • timeout_check_interval

      protected long timeout_check_interval
    • use_time_service

      protected boolean use_time_service
    • timestamps

      protected final ConcurrentMap<Address,Long> timestamps
    • time_service

      protected TimeService time_service
  • Constructor Details

    • FD_ALL

      public FD_ALL()
  • Method Details

    • getTimestamps

      protected Map<Address,?> getTimestamps()
      Specified by:
      getTimestamps in class FailureDetection
    • getTimeoutCheckInterval

      public long getTimeoutCheckInterval()
      Specified by:
      getTimeoutCheckInterval in class FailureDetection
    • setTimeoutCheckInterval

      public <T extends FailureDetection> T setTimeoutCheckInterval(long i)
    • printTimestamps

      public String printTimestamps()
    • init

      public void init() throws Exception
      Description copied from class: Protocol
      Called after a protocol has been created and before the protocol is started. Attributes are already set. Other protocols are not yet connected and events cannot yet be sent.
      Specified by:
      init in interface Lifecycle
      Overrides:
      init in class FailureDetection
      Throws:
      Exception - Thrown if protocol cannot be initialized successfully. This will cause the ProtocolStack to fail, so the the channel constructor will throw an exception
    • update

      protected void update(Address sender, boolean log_msg, boolean skip_if_exists)
      Specified by:
      update in class FailureDetection
    • getTimestamp

      protected long getTimestamp()
    • needsToBeSuspected

      protected <T> boolean needsToBeSuspected(Address mbr, T value)
      Specified by:
      needsToBeSuspected in class FailureDetection
    • getTimeoutCheckerInfo

      protected String getTimeoutCheckerInfo()
      Specified by:
      getTimeoutCheckerInfo in class FailureDetection
    • _printTimestamps

      protected String _printTimestamps()