akka.remote
Class DeadlineFailureDetector

java.lang.Object
  extended by akka.remote.DeadlineFailureDetector
All Implemented Interfaces:
FailureDetector

public class DeadlineFailureDetector
extends java.lang.Object
implements FailureDetector

Implementation of failure detector using an absolute timeout of missing heartbeats to trigger unavailability.


Nested Class Summary
 
Nested classes/interfaces inherited from interface akka.remote.FailureDetector
FailureDetector.Clock
 
Constructor Summary
DeadlineFailureDetector(com.typesafe.config.Config config, EventStream ev)
          Constructor that reads parameters from config.
DeadlineFailureDetector(scala.concurrent.duration.FiniteDuration acceptableHeartbeatPause, FailureDetector.Clock clock)
           
 
Method Summary
 scala.concurrent.duration.FiniteDuration acceptableHeartbeatPause()
           
 void heartbeat()
          Notifies the FailureDetector that a heartbeat arrived from the monitored resource.
 boolean isAvailable()
          Returns true if the resource is considered to be up and healthy and returns false otherwise.
 boolean isMonitoring()
          Returns true if the failure detector has received any heartbeats and started monitoring of the resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface akka.remote.FailureDetector
defaultClock
 

Constructor Detail

DeadlineFailureDetector

public DeadlineFailureDetector(scala.concurrent.duration.FiniteDuration acceptableHeartbeatPause,
                               FailureDetector.Clock clock)

DeadlineFailureDetector

public DeadlineFailureDetector(com.typesafe.config.Config config,
                               EventStream ev)
Constructor that reads parameters from config. Expecting config properties named acceptable-heartbeat-pause.

Method Detail

acceptableHeartbeatPause

public scala.concurrent.duration.FiniteDuration acceptableHeartbeatPause()

isAvailable

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

Specified by:
isAvailable 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

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