Package org.apache.cassandra.gms
Interface IFailureDetector
-
- All Known Implementing Classes:
FailureDetector
public interface IFailureDetector
An interface that provides an application with the ability to query liveness information of a node in the cluster. It also exposes methods which help an application register callbacks for notifications of liveness information of nodes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
forceConviction(InetAddressAndPort ep)
force conviction of endpoint in the failure detectorvoid
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 detectorvoid
report(InetAddressAndPort ep)
This method is invoked by the receiver of the heartbeat.void
unregisterFailureDetectionEventListener(IFailureDetectionEventListener listener)
Un-register interest for Failure Detector events.
-
-
-
Method Detail
-
isAlive
boolean isAlive(InetAddressAndPort ep)
Failure Detector's knowledge of whether a node is up or down.- Parameters:
ep
- endpoint in question.- Returns:
- true if UP and false if DOWN.
-
interpret
void interpret(InetAddressAndPort ep)
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.
-
report
void report(InetAddressAndPort ep)
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.
-
remove
void remove(InetAddressAndPort ep)
remove endpoint from failure detector
-
forceConviction
void forceConviction(InetAddressAndPort ep)
force conviction of endpoint in the failure detector
-
registerFailureDetectionEventListener
void registerFailureDetectionEventListener(IFailureDetectionEventListener listener)
Register interest for Failure Detector events.- Parameters:
listener
- implementation of an application provided IFailureDetectionEventListener
-
unregisterFailureDetectionEventListener
void unregisterFailureDetectionEventListener(IFailureDetectionEventListener listener)
Un-register interest for Failure Detector events.- Parameters:
listener
- implementation of an application provided IFailureDetectionEventListener
-
-