Class ClusterStatusCache
java.lang.Object
org.apache.pekko.actor.AbstractActor
com.arpnetworking.clusteraggregator.ClusterStatusCache
- All Implemented Interfaces:
org.apache.pekko.actor.Actor
public class ClusterStatusCache
extends org.apache.pekko.actor.AbstractActor
Caches the cluster state.
- Author:
- Brandon Arp (brandon dot arp at inscopemetrics dot com)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Request to get a cluster status.static final class
Response to a cluster 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
ConstructorsConstructorDescriptionClusterStatusCache
(org.apache.pekko.actor.ActorSystem system, Duration pollInterval, com.arpnetworking.metrics.MetricsFactory metricsFactory) Public constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.pekko.actor.AbstractActor.Receive
void
postStop()
void
preStart()
static org.apache.pekko.actor.Props
props
(org.apache.pekko.actor.ActorSystem system, Duration pollInterval, com.arpnetworking.metrics.MetricsFactory metricsFactory) 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, preRestart, preRestart, receive, receiveBuilder, self, sender, supervisorStrategy, unhandled
-
Constructor Details
-
ClusterStatusCache
public ClusterStatusCache(org.apache.pekko.actor.ActorSystem system, Duration pollInterval, com.arpnetworking.metrics.MetricsFactory metricsFactory) Public constructor.- Parameters:
system
- The PekkoActorSystem
.pollInterval
- TheDuration
for polling state.metricsFactory
- AMetricsFactory
to use for metrics creation.
-
-
Method Details
-
props
public static org.apache.pekko.actor.Props props(org.apache.pekko.actor.ActorSystem system, Duration pollInterval, com.arpnetworking.metrics.MetricsFactory metricsFactory) Creates aProps
for use in Pekko.- Parameters:
system
- The PekkoActorSystem
.pollInterval
- TheDuration
for polling state.metricsFactory
- AMetricsFactory
to use for metrics creation.- Returns:
- A new
Props
-
preStart
public void preStart()- Specified by:
preStart
in interfaceorg.apache.pekko.actor.Actor
- Overrides:
preStart
in classorg.apache.pekko.actor.AbstractActor
-
postStop
- Specified by:
postStop
in interfaceorg.apache.pekko.actor.Actor
- Overrides:
postStop
in classorg.apache.pekko.actor.AbstractActor
- Throws:
Exception
-
createReceive
public org.apache.pekko.actor.AbstractActor.Receive createReceive()- Specified by:
createReceive
in classorg.apache.pekko.actor.AbstractActor
-