Class Status
java.lang.Object
org.apache.pekko.actor.AbstractActor
com.arpnetworking.clusteraggregator.Status
- All Implemented Interfaces:
org.apache.pekko.actor.Actor
public class Status
extends org.apache.pekko.actor.AbstractActor
Periodically polls the cluster status and caches the result.
Accepts the following messages:
Status.StatusRequest
: Replies with a StatusResponse message containing the service status data
Status.HealthRequest
: Replies with a boolean value, true indicating healthy, false indicating unhealthy
Internal-only messages:
AssociationErrorEvent
: Evaluates the possibility of the node being quarantined- Author:
- Brandon Arp (brandon dot arp at inscopemetrics dot com)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Represents a health check request.static final class
Represents a status request.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$
-
Constructor Summary
ConstructorsConstructorDescriptionStatus
(org.apache.pekko.cluster.Cluster cluster, org.apache.pekko.actor.ActorRef clusterStatusCache, org.apache.pekko.actor.ActorRef localMetrics) Public constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.pekko.actor.AbstractActor.Receive
static org.apache.pekko.actor.Props
props
(org.apache.pekko.cluster.Cluster cluster, org.apache.pekko.actor.ActorRef clusterStatusCache, org.apache.pekko.actor.ActorRef localMetrics) Creates aProps
for use in Pekko.Methods inherited from class org.apache.pekko.actor.AbstractActor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, 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
-
Constructor Details
-
Status
public Status(org.apache.pekko.cluster.Cluster cluster, org.apache.pekko.actor.ActorRef clusterStatusCache, org.apache.pekko.actor.ActorRef localMetrics) Public constructor.- Parameters:
cluster
- The instance of the Clustering extension.clusterStatusCache
- The actor holding the cached cluster status.localMetrics
- The actor holding the local node metrics.
-
-
Method Details
-
props
public static org.apache.pekko.actor.Props props(org.apache.pekko.cluster.Cluster cluster, org.apache.pekko.actor.ActorRef clusterStatusCache, org.apache.pekko.actor.ActorRef localMetrics) Creates aProps
for use in Pekko.- Parameters:
cluster
- The instance of the Clustering extension.clusterStatusCache
- The actor holding the cached cluster status.localMetrics
- The actor holding the local node metrics.- Returns:
- A new
Props
.
-
createReceive
public org.apache.pekko.actor.AbstractActor.Receive createReceive()- Specified by:
createReceive
in classorg.apache.pekko.actor.AbstractActor
-