akka.remote
Interface FailureDetector

All Known Implementing Classes:
PhiAccrualFailureDetector

public interface FailureDetector

A failure detector must be a thread-safe mutable construct that registers heartbeat events of a resource and is able to decide the availability of that monitored resource.


Nested Class Summary
static class FailureDetector.Clock
          Abstraction of a clock that returns time in milliseconds.
 
Method Summary
 FailureDetector.Clock defaultClock()
           
 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.
 

Method Detail

defaultClock

FailureDetector.Clock defaultClock()

isAvailable

boolean isAvailable()
Returns true if the resource is considered to be up and healthy and returns false otherwise.


isMonitoring

boolean isMonitoring()
Returns true if the failure detector has received any heartbeats and started monitoring of the resource.


heartbeat

void heartbeat()
Notifies the FailureDetector that a heartbeat arrived from the monitored resource. This causes the FailureDetector to update its state.