Class FD_ALL3

  • All Implemented Interfaces:
    Lifecycle

    public class FD_ALL3
    extends FailureDetection
    Failure detection based on simple heartbeat protocol. Every member periodically (interval ms) multicasts a heartbeat. Every member maintains a table of all members (minus itself) and a bitmap with timeout/interval bits, initially all set to 1. On each interval, the TimeoutChecker task advances the index and sets the bit at the index to 0.
    When all bits are 0, a member will be suspected.
    On reception of a message or heartbeat from P, P's bitmap at index is set to 1.
    JIRA: https://issues.redhat.com/browse/JGRP-2451
    Version:
    5.0.0
    Author:
    Dan Berindei, Bela Ban
    • Field Detail

      • num_bits

        protected int num_bits
    • Constructor Detail

      • FD_ALL3

        public FD_ALL3()
    • Method Detail

      • 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
      • start

        public void start()
                   throws java.lang.Exception
        Description copied from class: Protocol
        This method is called on a JChannel.connect(String); starts work. Protocols are connected ready to receive events. Will be called from bottom to top.
        Specified by:
        start in interface Lifecycle
        Overrides:
        start in class Protocol
        Throws:
        java.lang.Exception - Thrown if protocol cannot be started successfully. This will cause the ProtocolStack to fail, so JChannel.connect(String) will throw an exception
      • computeBits

        protected int computeBits()
      • _printTimestamps

        protected java.lang.String _printTimestamps()