akka.cluster
Class AccrualFailureDetector

java.lang.Object
  extended by akka.cluster.AccrualFailureDetector
All Implemented Interfaces:
FailureDetector

public class AccrualFailureDetector
extends java.lang.Object
implements FailureDetector


Constructor Summary
AccrualFailureDetector(ActorSystem system, ClusterSettings settings)
          Constructor that picks configuration from the settings.
AccrualFailureDetector(ActorSystem system, double threshold, int maxSampleSize, scala.concurrent.duration.Duration minStdDeviation, scala.concurrent.duration.Duration acceptableHeartbeatPause, scala.concurrent.duration.Duration firstHeartbeatEstimate, scala.Function0<java.lang.Object> clock)
           
 
Method Summary
 scala.concurrent.duration.Duration acceptableHeartbeatPause()
           
 scala.Function0<java.lang.Object> clock()
           
 scala.concurrent.duration.Duration firstHeartbeatEstimate()
           
 void heartbeat(Address connection)
          Records a heartbeat for a connection.
 boolean isAvailable(Address connection)
          Returns true if the connection is considered to be up and healthy and returns false otherwise.
 boolean isMonitoring(Address connection)
          Returns true if the failure detector has received any heartbeats and started monitoring of the resource.
 int maxSampleSize()
           
 scala.concurrent.duration.Duration minStdDeviation()
           
 double phi(Address connection)
          The suspicion level of the accrual failure detector.
 void remove(Address connection)
          Removes the heartbeat management for a connection.
 void reset()
          Removes all connections and starts over.
 ActorSystem system()
           
 double threshold()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccrualFailureDetector

public AccrualFailureDetector(ActorSystem system,
                              double threshold,
                              int maxSampleSize,
                              scala.concurrent.duration.Duration minStdDeviation,
                              scala.concurrent.duration.Duration acceptableHeartbeatPause,
                              scala.concurrent.duration.Duration firstHeartbeatEstimate,
                              scala.Function0<java.lang.Object> clock)

AccrualFailureDetector

public AccrualFailureDetector(ActorSystem system,
                              ClusterSettings settings)
Constructor that picks configuration from the settings.

Method Detail

system

public ActorSystem system()

threshold

public double threshold()

maxSampleSize

public int maxSampleSize()

minStdDeviation

public scala.concurrent.duration.Duration minStdDeviation()

acceptableHeartbeatPause

public scala.concurrent.duration.Duration acceptableHeartbeatPause()

firstHeartbeatEstimate

public scala.concurrent.duration.Duration firstHeartbeatEstimate()

clock

public scala.Function0<java.lang.Object> clock()

isAvailable

public boolean isAvailable(Address connection)
Description copied from interface: FailureDetector
Returns true if the connection is considered to be up and healthy and returns false otherwise.

Specified by:
isAvailable in interface FailureDetector

isMonitoring

public boolean isMonitoring(Address connection)
Description copied from interface: FailureDetector
Returns true if the failure detector has received any heartbeats and started monitoring of the resource.

Specified by:
isMonitoring in interface FailureDetector

heartbeat

public final void heartbeat(Address connection)
Records a heartbeat for a connection.

Specified by:
heartbeat in interface FailureDetector

phi

public double phi(Address connection)
The suspicion level of the accrual failure detector.

If a connection does not have any records in failure detector then it is considered healthy.


remove

public final void remove(Address connection)
Removes the heartbeat management for a connection.

Specified by:
remove in interface FailureDetector

reset

public void reset()
Description copied from interface: FailureDetector
Removes all connections and starts over.

Specified by:
reset in interface FailureDetector