Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cassandra.gms
Class FailureDetector

    java.lang.Object
      org.apache.cassandra.gms.FailureDetector

All Implemented Interfaces:
  FailureDetectorMBean, IFailureDetector

    public class FailureDetector

extends java.lang.Object
implements IFailureDetector, FailureDetectorMBean

This FailureDetector is an implementation of the paper titled "The Phi Accrual Failure Detector" by Hayashibara. Check the paper and the IFailureDetector interface for details.

Field Summary
`static IFailureDetector` | `instance`

Constructor Summary
`FailureDetector()`

Method Summary
`void` | `dumpInterArrivalTimes()` Dump the inter arrival times for examination if necessary.
`int` | `getPhiConvictThreshold()`
`void` | `interpret(java.net.InetAddress ep)` This method is invoked by any entity wanting to interrogate the status of an endpoint.
`boolean` | `isAlive(java.net.InetAddress ep)` Failure Detector's knowledge of whether a node is up or down.
`static void` | `main(java.lang.String[] args)`
`void` | `registerFailureDetectionEventListener(IFailureDetectionEventListener listener)` Register interest for Failure Detector events.
`void` | `remove(java.net.InetAddress ep)` remove endpoint from failure detector
`void` | `report(java.net.InetAddress ep)` This method is invoked by the receiver of the heartbeat.
`void` | `setPhiConvictThreshold(int phi)`
`java.lang.String` | `toString()`
`void` | `unregisterFailureDetectionEventListener(IFailureDetectionEventListener listener)` Un-register interest for Failure Detector events.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### instance

    public static final IFailureDetector instance

Constructor Detail

### FailureDetector

    public FailureDetector()

Method Detail

### dumpInterArrivalTimes

    public void dumpInterArrivalTimes()

  Dump the inter arrival times for examination if necessary.

  Specified by:
    `dumpInterArrivalTimes` in interface `FailureDetectorMBean`

### setPhiConvictThreshold

    public void setPhiConvictThreshold(int phi)

  Specified by:
    `setPhiConvictThreshold` in interface `FailureDetectorMBean`

### getPhiConvictThreshold

    public int getPhiConvictThreshold()

  Specified by:
    `getPhiConvictThreshold` in interface `FailureDetectorMBean`

### isAlive

    public boolean isAlive(java.net.InetAddress ep)

  Description copied from interface: `IFailureDetector`
  Failure Detector's knowledge of whether a node is up or down.

  Specified by:
    `isAlive` in interface `IFailureDetector`
  Parameters:
    `ep` - endpoint in question.
  Returns:
    true if UP and false if DOWN.

### report

    public void report(java.net.InetAddress ep)

  Description copied from interface: `IFailureDetector`
  This method is invoked by the receiver of the heartbeat. In our case it would be the Gossiper. Gossiper inform the Failure Detector on receipt of a heartbeat. The FailureDetector will then sample the arrival time as explained in the paper. param ep endpoint being reported.

  Specified by:
    `report` in interface `IFailureDetector`

### interpret

    public void interpret(java.net.InetAddress ep)

  Description copied from interface: `IFailureDetector`
  This method is invoked by any entity wanting to interrogate the status of an endpoint. In our case it would be the Gossiper. The Failure Detector will then calculate Phi and deem an endpoint as suspicious or alive as explained in the Hayashibara paper. param ep endpoint for which we interpret the inter arrival times.

  Specified by:
    `interpret` in interface `IFailureDetector`

### remove

    public void remove(java.net.InetAddress ep)

  Description copied from interface: `IFailureDetector`
  remove endpoint from failure detector

  Specified by:
    `remove` in interface `IFailureDetector`

### registerFailureDetectionEventListener

    public void registerFailureDetectionEventListener(IFailureDetectionEventListener listener)

  Description copied from interface: `IFailureDetector`
  Register interest for Failure Detector events.

  Specified by:
    `registerFailureDetectionEventListener` in interface `IFailureDetector`
  Parameters:
    `listener` - implementation of an application provided IFailureDetectionEventListener

### unregisterFailureDetectionEventListener

    public void unregisterFailureDetectionEventListener(IFailureDetectionEventListener listener)

  Description copied from interface: `IFailureDetector`
  Un-register interest for Failure Detector events.

  Specified by:
    `unregisterFailureDetectionEventListener` in interface `IFailureDetector`
  Parameters:
    `listener` - implementation of an application provided IFailureDetectionEventListener

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### main

    public static void main(java.lang.String[] args)
                     throws java.lang.Throwable

  Throws:
    `java.lang.Throwable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 The Apache Software Foundation