Package akka.remote

Interface FailureDetectorRegistry<A>

  • All Known Implementing Classes:
    DefaultFailureDetectorRegistry

    public interface FailureDetectorRegistry<A>
    Interface for a registry of Akka failure detectors. New resources are implicitly registered when heartbeat is first called with the resource given as parameter.

    type parameter A: - The type of the key that identifies a resource to be monitored by a failure detector

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void heartbeat​(A resource)
      Records a heartbeat for a resource.
      boolean isAvailable​(A resource)
      Returns true if the resource is considered to be up and healthy and returns false otherwise.
      boolean isMonitoring​(A resource)
      Returns true if the failure detector has received any heartbeats and started monitoring of the resource.
      void remove​(A resource)
      Removes the heartbeat management for a resource.
      void reset()
      Removes all resources and any associated failure detector state.
    • Method Detail

      • heartbeat

        void heartbeat​(A resource)
        Records a heartbeat for a resource. If the resource is not yet registered (i.e. this is the first heartbeat) then it is automatically registered.
      • isAvailable

        boolean isAvailable​(A resource)
        Returns true if the resource is considered to be up and healthy and returns false otherwise. For unregistered resources it returns true.
      • isMonitoring

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

        void remove​(A resource)
        Removes the heartbeat management for a resource.
      • reset

        void reset()
        Removes all resources and any associated failure detector state.