Class AbstractHealthCheckingActor

java.lang.Object
org.apache.pekko.actor.AbstractActor
org.apache.pekko.actor.AbstractActorWithTimers
org.eclipse.ditto.internal.utils.health.AbstractHealthCheckingActor
All Implemented Interfaces:
org.apache.pekko.actor.Actor, org.apache.pekko.actor.Timers
Direct Known Subclasses:
CompositeCachingHealthCheckingActor, SingletonStatusReporter

public abstract class AbstractHealthCheckingActor extends org.apache.pekko.actor.AbstractActorWithTimers
Abstract base implementations for actors which check the health of a subsystem.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.pekko.actor.AbstractActor

    org.apache.pekko.actor.AbstractActor.ActorContext, org.apache.pekko.actor.AbstractActor.Receive

    Nested classes/interfaces inherited from interface org.apache.pekko.actor.Actor

    org.apache.pekko.actor.Actor.emptyBehavior$, org.apache.pekko.actor.Actor.ignoringBehavior$
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The required actor name of the Actor to be created in the ActorSystem.
    protected final org.apache.pekko.event.DiagnosticLoggingAdapter
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.pekko.actor.AbstractActor.Receive
     
     
    protected abstract org.apache.pekko.actor.AbstractActor.Receive
    Defines a AbstractActor.Receive for the messages to be handled by the subclass actor.
    protected abstract void
    Defines the action of the subclass actor which will be triggered when its health status is requested.
    protected final void
    This method has to be used by subclass actors to update the health status.

    Methods inherited from class org.apache.pekko.actor.AbstractActorWithTimers

    aroundPostStop, aroundPreRestart, aroundReceive, getTimers, org$apache$pekko$actor$Timers$_setter_$org$apache$pekko$actor$Timers$$_timers_$eq, org$apache$pekko$actor$Timers$$_timers, timers

    Methods inherited from class org.apache.pekko.actor.AbstractActor

    aroundPostRestart, aroundPreStart, context, emptyBehavior, getContext, getSelf, getSender, org$apache$pekko$actor$Actor$_setter_$context_$eq, org$apache$pekko$actor$Actor$_setter_$self_$eq, postRestart, postStop, preRestart, preRestart, preStart, receive, receiveBuilder, self, sender, supervisorStrategy, unhandled

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.pekko.actor.Actor

    aroundPostRestart, aroundPreStart, context, org$apache$pekko$actor$Actor$_setter_$context_$eq, org$apache$pekko$actor$Actor$_setter_$self_$eq, postRestart, postStop, preRestart, preStart, receive, self, sender, supervisorStrategy, unhandled
  • Field Details

    • ACTOR_NAME

      public static final String ACTOR_NAME
      The required actor name of the Actor to be created in the ActorSystem.
      See Also:
    • log

      protected final org.apache.pekko.event.DiagnosticLoggingAdapter log
  • Constructor Details

    • AbstractHealthCheckingActor

      public AbstractHealthCheckingActor()
  • Method Details

    • createReceive

      public org.apache.pekko.actor.AbstractActor.Receive createReceive()
      Specified by:
      createReceive in class org.apache.pekko.actor.AbstractActor
    • matchCustomMessages

      protected abstract org.apache.pekko.actor.AbstractActor.Receive matchCustomMessages()
      Defines a AbstractActor.Receive for the messages to be handled by the subclass actor.
      Returns:
      the AbstractActor.Receive.
    • triggerHealthRetrieval

      protected abstract void triggerHealthRetrieval()
      Defines the action of the subclass actor which will be triggered when its health status is requested.
    • updateHealth

      protected final void updateHealth(StatusInfo newHealth)
      This method has to be used by subclass actors to update the health status. An update to health will notify all actors which have asked for the health status since the last update.
      Parameters:
      newHealth - the new health
    • getHealth

      public final StatusInfo getHealth()