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
    Author:
    Bela Ban
    • Field Detail

      • timeout_check_interval

        protected long timeout_check_interval
      • use_time_service

        protected boolean use_time_service
      • timestamps

        protected final java.util.concurrent.ConcurrentMap<Address,​java.lang.Long> timestamps
    • Constructor Detail

      • FD_ALL

        public FD_ALL()
    • Method Detail

      • setTimeoutCheckInterval

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

        public java.lang.String printTimestamps()
      • init

        public void init()
                  throws java.lang.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:
        java.lang.Exception - Thrown if protocol cannot be initialized successfully. This will cause the ProtocolStack to fail, so the the channel constructor will throw an exception
      • getTimestamp

        protected long getTimestamp()
      • _printTimestamps

        protected java.lang.String _printTimestamps()