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.util.function.Predicate<InetAddressAndPort> |
isEndpointAlive |
static java.util.function.Predicate<Replica> |
isReplicaAlive |
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(InetAddressAndPort ep)
force conviction of endpoint in the failure detector
|
java.lang.String |
getAllEndpointStates() |
java.lang.String |
getAllEndpointStates(boolean withPort) |
java.lang.String |
getAllEndpointStatesWithPort() |
int |
getDownEndpointCount() |
java.lang.String |
getEndpointState(java.lang.String address) |
double |
getPhiConvictThreshold() |
javax.management.openmbean.TabularData |
getPhiValues() |
javax.management.openmbean.TabularData |
getPhiValuesWithPort() |
java.util.Map<java.lang.String,java.lang.String> |
getSimpleStates() |
java.util.Map<java.lang.String,java.lang.String> |
getSimpleStatesWithPort() |
int |
getUpEndpointCount() |
void |
interpret(InetAddressAndPort ep)
This method is invoked by any entity wanting to interrogate the status of an endpoint.
|
boolean |
isAlive(InetAddressAndPort ep)
Failure Detector's knowledge of whether a node is up or
down.
|
void |
registerFailureDetectionEventListener(IFailureDetectionEventListener listener)
Register interest for Failure Detector events.
|
void |
remove(InetAddressAndPort ep)
remove endpoint from failure detector
|
void |
report(InetAddressAndPort 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 static final java.util.function.Predicate<InetAddressAndPort> isEndpointAlive
public static final java.util.function.Predicate<Replica> isReplicaAlive
public java.lang.String getAllEndpointStates()
getAllEndpointStates in interface FailureDetectorMBeanpublic java.lang.String getAllEndpointStatesWithPort()
getAllEndpointStatesWithPort in interface FailureDetectorMBeanpublic java.lang.String getAllEndpointStates(boolean withPort)
public java.util.Map<java.lang.String,java.lang.String> getSimpleStates()
getSimpleStates in interface FailureDetectorMBeanpublic java.util.Map<java.lang.String,java.lang.String> getSimpleStatesWithPort()
getSimpleStatesWithPort in interface FailureDetectorMBeanpublic int getDownEndpointCount()
getDownEndpointCount in interface FailureDetectorMBeanpublic int getUpEndpointCount()
getUpEndpointCount in interface FailureDetectorMBeanpublic javax.management.openmbean.TabularData getPhiValues()
throws javax.management.openmbean.OpenDataException
getPhiValues in interface FailureDetectorMBeanjavax.management.openmbean.OpenDataExceptionpublic javax.management.openmbean.TabularData getPhiValuesWithPort()
throws javax.management.openmbean.OpenDataException
getPhiValuesWithPort in interface FailureDetectorMBeanjavax.management.openmbean.OpenDataExceptionpublic java.lang.String getEndpointState(java.lang.String address)
throws java.net.UnknownHostException
getEndpointState in interface FailureDetectorMBeanjava.net.UnknownHostExceptionpublic void dumpInterArrivalTimes()
dumpInterArrivalTimes in interface FailureDetectorMBeanpublic void setPhiConvictThreshold(double phi)
setPhiConvictThreshold in interface FailureDetectorMBeanpublic double getPhiConvictThreshold()
getPhiConvictThreshold in interface FailureDetectorMBeanpublic boolean isAlive(InetAddressAndPort ep)
IFailureDetectorisAlive in interface IFailureDetectorep - endpoint in question.public void report(InetAddressAndPort ep)
IFailureDetectorreport in interface IFailureDetectorpublic void interpret(InetAddressAndPort ep)
IFailureDetectorinterpret in interface IFailureDetectorpublic void forceConviction(InetAddressAndPort ep)
IFailureDetectorforceConviction in interface IFailureDetectorpublic void remove(InetAddressAndPort ep)
IFailureDetectorremove in interface IFailureDetectorpublic void registerFailureDetectionEventListener(IFailureDetectionEventListener listener)
IFailureDetectorregisterFailureDetectionEventListener in interface IFailureDetectorlistener - implementation of an application provided IFailureDetectionEventListenerpublic void unregisterFailureDetectionEventListener(IFailureDetectionEventListener listener)
IFailureDetectorunregisterFailureDetectionEventListener in interface IFailureDetectorlistener - implementation of an application provided IFailureDetectionEventListenerpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2009-2020 The Apache Software Foundation