Package akka.remote

Class PhiAccrualFailureDetector

  • All Implemented Interfaces:
    FailureDetector

    public class PhiAccrualFailureDetector
    extends java.lang.Object
    implements FailureDetector
    Constructor without eventStream to support backwards compatibility
    • Constructor Summary

      Constructors 
      Constructor Description
      PhiAccrualFailureDetector​(double threshold, int maxSampleSize, scala.concurrent.duration.FiniteDuration minStdDeviation, scala.concurrent.duration.FiniteDuration acceptableHeartbeatPause, scala.concurrent.duration.FiniteDuration firstHeartbeatEstimate, FailureDetector.Clock clock)  
      PhiAccrualFailureDetector​(double threshold, int maxSampleSize, scala.concurrent.duration.FiniteDuration minStdDeviation, scala.concurrent.duration.FiniteDuration acceptableHeartbeatPause, scala.concurrent.duration.FiniteDuration firstHeartbeatEstimate, scala.Option<EventStream> eventStream, FailureDetector.Clock clock)  
      PhiAccrualFailureDetector​(com.typesafe.config.Config config, EventStream ev)
      Constructor that reads parameters from config.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      scala.concurrent.duration.FiniteDuration acceptableHeartbeatPause()  
      java.lang.String address()  
      void address_$eq​(java.lang.String x$1)  
      scala.concurrent.duration.FiniteDuration firstHeartbeatEstimate()  
      void heartbeat()
      Notifies the FailureDetector that a heartbeat arrived from the monitored resource.
      boolean isAvailable()  
      boolean isMonitoring()
      Returns true if the failure detector has received any heartbeats and started monitoring of the resource.
      int maxSampleSize()  
      scala.concurrent.duration.FiniteDuration minStdDeviation()  
      double phi()
      The suspicion level of the accrual failure detector.
      double phi​(long timeDiff, double mean, double stdDeviation)
      Calculation of phi, derived from the Cumulative distribution function for N(mean, stdDeviation) normal distribution, given by 1.0 / (1.0 + math.exp(-y * (1.5976 + 0.070566 * y * y))) where y = (x - mean) / standard_deviation This is an approximation defined in β Mathematics Handbook (Logistic approximation).
      double threshold()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PhiAccrualFailureDetector

        public PhiAccrualFailureDetector​(double threshold,
                                         int maxSampleSize,
                                         scala.concurrent.duration.FiniteDuration minStdDeviation,
                                         scala.concurrent.duration.FiniteDuration acceptableHeartbeatPause,
                                         scala.concurrent.duration.FiniteDuration firstHeartbeatEstimate,
                                         scala.Option<EventStream> eventStream,
                                         FailureDetector.Clock clock)
      • PhiAccrualFailureDetector

        public PhiAccrualFailureDetector​(double threshold,
                                         int maxSampleSize,
                                         scala.concurrent.duration.FiniteDuration minStdDeviation,
                                         scala.concurrent.duration.FiniteDuration acceptableHeartbeatPause,
                                         scala.concurrent.duration.FiniteDuration firstHeartbeatEstimate,
                                         FailureDetector.Clock clock)
      • PhiAccrualFailureDetector

        public PhiAccrualFailureDetector​(com.typesafe.config.Config config,
                                         EventStream ev)
        Constructor that reads parameters from config. Expecting config properties named threshold, max-sample-size, min-std-deviation, acceptable-heartbeat-pause and heartbeat-interval.
        Parameters:
        config - (undocumented)
        ev - (undocumented)
    • Method Detail

      • acceptableHeartbeatPause

        public scala.concurrent.duration.FiniteDuration acceptableHeartbeatPause()
      • address

        public java.lang.String address()
      • address_$eq

        public void address_$eq​(java.lang.String x$1)
      • firstHeartbeatEstimate

        public scala.concurrent.duration.FiniteDuration firstHeartbeatEstimate()
      • heartbeat

        public final void heartbeat()
        Description copied from interface: FailureDetector
        Notifies the FailureDetector that a heartbeat arrived from the monitored resource. This causes the FailureDetector to update its state.
        Specified by:
        heartbeat in interface FailureDetector
      • isMonitoring

        public boolean isMonitoring()
        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
        Returns:
        (undocumented)
      • maxSampleSize

        public int maxSampleSize()
      • minStdDeviation

        public scala.concurrent.duration.FiniteDuration minStdDeviation()
      • phi

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

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

        Returns:
        (undocumented)
      • phi

        public double phi​(long timeDiff,
                          double mean,
                          double stdDeviation)
        Calculation of phi, derived from the Cumulative distribution function for N(mean, stdDeviation) normal distribution, given by 1.0 / (1.0 + math.exp(-y * (1.5976 + 0.070566 * y * y))) where y = (x - mean) / standard_deviation This is an approximation defined in β Mathematics Handbook (Logistic approximation). Error is 0.00014 at +- 3.16 The calculated value is equivalent to -log10(1 - CDF(y))
        Parameters:
        timeDiff - (undocumented)
        mean - (undocumented)
        stdDeviation - (undocumented)
        Returns:
        (undocumented)
      • threshold

        public double threshold()