public class FailureDetector extends java.lang.Object implements IFailureDetector, FailureDetectorMBean
Modifier and Type | Field and Description |
---|---|
protected static long |
INITIAL_VALUE_NANOS |
static IFailureDetector |
instance |
static java.lang.String |
MBEAN_NAME |
Constructor and Description |
---|
FailureDetector() |
Modifier and Type | Method and Description |
---|---|
void |
dumpInterArrivalTimes()
Dump the inter arrival times for examination if necessary.
|
void |
forceConviction(java.net.InetAddress ep)
force conviction of endpoint in the failure detector
|
java.lang.String |
getAllEndpointStates() |
int |
getDownEndpointCount() |
java.lang.String |
getEndpointState(java.lang.String address) |
double |
getPhiConvictThreshold() |
java.util.Map<java.lang.String,java.lang.String> |
getSimpleStates() |
int |
getUpEndpointCount() |
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(double phi) |
java.lang.String |
toString() |
void |
unregisterFailureDetectionEventListener(IFailureDetectionEventListener listener)
Un-register interest for Failure Detector events.
|
public static final java.lang.String MBEAN_NAME
protected static final long INITIAL_VALUE_NANOS
public static final IFailureDetector instance
public java.lang.String getAllEndpointStates()
getAllEndpointStates
in interface FailureDetectorMBean
public java.util.Map<java.lang.String,java.lang.String> getSimpleStates()
getSimpleStates
in interface FailureDetectorMBean
public int getDownEndpointCount()
getDownEndpointCount
in interface FailureDetectorMBean
public int getUpEndpointCount()
getUpEndpointCount
in interface FailureDetectorMBean
public java.lang.String getEndpointState(java.lang.String address) throws java.net.UnknownHostException
getEndpointState
in interface FailureDetectorMBean
java.net.UnknownHostException
public void dumpInterArrivalTimes()
dumpInterArrivalTimes
in interface FailureDetectorMBean
public void setPhiConvictThreshold(double phi)
setPhiConvictThreshold
in interface FailureDetectorMBean
public double getPhiConvictThreshold()
getPhiConvictThreshold
in interface FailureDetectorMBean
public boolean isAlive(java.net.InetAddress ep)
IFailureDetector
isAlive
in interface IFailureDetector
ep
- endpoint in question.public void report(java.net.InetAddress ep)
IFailureDetector
report
in interface IFailureDetector
public void interpret(java.net.InetAddress ep)
IFailureDetector
interpret
in interface IFailureDetector
public void forceConviction(java.net.InetAddress ep)
IFailureDetector
forceConviction
in interface IFailureDetector
public void remove(java.net.InetAddress ep)
IFailureDetector
remove
in interface IFailureDetector
public void registerFailureDetectionEventListener(IFailureDetectionEventListener listener)
IFailureDetector
registerFailureDetectionEventListener
in interface IFailureDetector
listener
- implementation of an application provided IFailureDetectionEventListenerpublic void unregisterFailureDetectionEventListener(IFailureDetectionEventListener listener)
IFailureDetector
unregisterFailureDetectionEventListener
in interface IFailureDetector
listener
- implementation of an application provided IFailureDetectionEventListenerpublic java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
Copyright © 2017 The Apache Software Foundation