Class ConfigurableActorProxy<T>
java.lang.Object
org.apache.pekko.actor.AbstractActor
com.arpnetworking.clusteraggregator.configuration.ConfigurableActorProxy<T>
- Type Parameters:
T
- The type of configuration
- All Implemented Interfaces:
org.apache.pekko.actor.Actor
public class ConfigurableActorProxy<T>
extends org.apache.pekko.actor.AbstractActor
Serves as a router for configuration-created actors. Handles reconfiguration messages and swaps references on reconfiguration.
- Author:
- Brandon Arp (brandon dot arp at inscopemetrics dot com)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Message class to cause a new configuration to be applied.static final class
Message class to tell observers that a new actor has started due to a configuration change.static final class
Message class to send to theConfigurableActorProxy
to indicate you want to receive event notifications.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
ConstructorsConstructorDescriptionConfigurableActorProxy
(ConfiguredLaunchableFactory<org.apache.pekko.actor.Props, T> factory) Public constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.pekko.actor.AbstractActor.Receive
static <T> org.apache.pekko.actor.Props
props
(ConfiguredLaunchableFactory<org.apache.pekko.actor.Props, T> factory) Creates aProps
.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
-
ConfigurableActorProxy
Public constructor.- Parameters:
factory
- Factory to create an actor from a configuration.
-
-
Method Details
-
props
public static <T> org.apache.pekko.actor.Props props(ConfiguredLaunchableFactory<org.apache.pekko.actor.Props, T> factory) Creates aProps
.- Type Parameters:
T
- configuration type- Parameters:
factory
- factory to create an actor- Returns:
- a new
Props
-
createReceive
public org.apache.pekko.actor.AbstractActor.Receive createReceive()- Specified by:
createReceive
in classorg.apache.pekko.actor.AbstractActor
-