Class TcpFailureDetector

java.lang.Object
org.apache.catalina.tribes.group.ChannelInterceptorBase
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
All Implemented Interfaces:
ChannelInterceptor, TcpFailureDetectorMBean, Heartbeat, MembershipListener

public class TcpFailureDetector extends ChannelInterceptorBase implements TcpFailureDetectorMBean
The TcpFailureDetector is a useful interceptor that adds reliability to the membership layer.

If the network is busy, or the system is busy so that the membership receiver thread is not getting enough time to update its table, members can be "timed out" This failure detector will intercept the memberDisappeared message(unless its a true shutdown message) and connect to the member using TCP.

The TcpFailureDetector works in two ways:

  1. It intercepts memberDisappeared events
  2. It catches send errors
  • Field Details

    • sm

      protected static final StringManager sm
      The string manager for this package.
    • TCP_FAIL_DETECT

      protected static final byte[] TCP_FAIL_DETECT
      Test payload sent during member liveness checks.
    • connectTimeout

      protected long connectTimeout
      Connection timeout in milliseconds for member checks.
    • performSendTest

      protected boolean performSendTest
      Whether to perform TCP send tests during member checks.
    • performReadTest

      protected boolean performReadTest
      Whether to perform TCP read tests during member checks.
    • readTestTimeout

      protected long readTestTimeout
      Read test timeout in milliseconds.
    • membership

      protected Membership membership
      The membership tracker.
    • removeSuspects

      protected final HashMap<Member,Long> removeSuspects
      Map of members suspected of being dead and their detection time.
    • addSuspects

      protected final HashMap<Member,Long> addSuspects
      Map of members suspected of rejoining and their detection time.
    • removeSuspectsTimeout

      protected int removeSuspectsTimeout
      Timeout in seconds for removing suspected dead members.
  • Constructor Details

    • TcpFailureDetector

      public TcpFailureDetector()
      Constructs a new TcpFailureDetector.
  • Method Details