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.ReceiveNested classes/interfaces inherited from interface org.apache.pekko.actor.Actor
org.apache.pekko.actor.Actor.emptyBehavior$, org.apache.pekko.actor.Actor.ignoringBehavior$ -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe required actor name of the Actor to be created in the ActorSystem.protected final org.apache.pekko.event.DiagnosticLoggingAdapter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.pekko.actor.AbstractActor.Receivefinal StatusInfoprotected abstract org.apache.pekko.actor.AbstractActor.ReceiveDefines aAbstractActor.Receivefor the messages to be handled by the subclass actor.protected abstract voidDefines the action of the subclass actor which will be triggered when its health status is requested.protected final voidupdateHealth(StatusInfo newHealth) 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, timersMethods 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, unhandledMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
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:
createReceivein classorg.apache.pekko.actor.AbstractActor
-
matchCustomMessages
protected abstract org.apache.pekko.actor.AbstractActor.Receive matchCustomMessages()Defines aAbstractActor.Receivefor 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
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
-