public final class AdaptiveLoadBalancingGroup extends java.lang.Object implements Group, scala.Product, scala.Serializable
It uses random selection of routees based on probabilities derived from the remaining capacity of corresponding node.
The configuration parameter trumps the constructor arguments. This means that
if you provide paths
during instantiation they will be ignored if
the router is defined in the configuration file for the actor being used.
param: metricsSelector decides what probability to use for selecting a routee, based on remaining capacity as indicated by the node metrics
param: paths string representation of the actor paths of the routees, messages are
sent with ActorSelection
to these paths
param: routerDispatcher dispatcher to use for the router head actor, which handles router management messages
Constructor and Description |
---|
AdaptiveLoadBalancingGroup(com.typesafe.config.Config config,
DynamicAccess dynamicAccess)
Deprecated.
|
AdaptiveLoadBalancingGroup(MetricsSelector metricsSelector,
java.lang.Iterable<java.lang.String> routeesPaths)
Deprecated.
Java API
|
AdaptiveLoadBalancingGroup(MetricsSelector metricsSelector,
scala.collection.immutable.Iterable<java.lang.String> paths,
java.lang.String routerDispatcher)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
abstract static boolean |
canEqual(java.lang.Object that)
Deprecated.
|
Router |
createRouter(ActorSystem system)
Deprecated.
Create the actual router, responsible for routing messages to routees.
|
static RouterActor |
createRouterActor()
Deprecated.
|
abstract static boolean |
equals(java.lang.Object that)
Deprecated.
|
static boolean |
isManagementMessage(java.lang.Object msg)
Deprecated.
|
MetricsSelector |
metricsSelector()
Deprecated.
|
scala.collection.immutable.Iterable<java.lang.String> |
paths()
Deprecated.
|
scala.collection.immutable.Iterable<java.lang.String> |
paths(ActorSystem system)
Deprecated.
|
abstract static int |
productArity()
Deprecated.
|
abstract static java.lang.Object |
productElement(int n)
Deprecated.
|
static scala.collection.Iterator<java.lang.Object> |
productIterator()
Deprecated.
|
static java.lang.String |
productPrefix()
Deprecated.
|
static Props |
props()
Deprecated.
|
static Routee |
routeeFor(java.lang.String path,
ActorContext context)
Deprecated.
|
java.lang.String |
routerDispatcher()
Deprecated.
Dispatcher ID to use for running the “head” actor, which handles
supervision, death watch and router management messages
|
scala.Option<Props> |
routingLogicController(RoutingLogic routingLogic)
Deprecated.
Possibility to define an actor for controlling the routing
logic from external stimuli (e.g.
|
static boolean |
stopRouterWhenAllRouteesRemoved()
Deprecated.
|
static void |
verifyConfig(ActorPath path)
Deprecated.
|
AdaptiveLoadBalancingGroup |
withDispatcher(java.lang.String dispatcherId)
Deprecated.
Setting the dispatcher to be used for the router head actor, which handles
router management messages
|
static RouterConfig |
withFallback(RouterConfig other)
Deprecated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createRouterActor, props, routeeFor
isManagementMessage, stopRouterWhenAllRouteesRemoved, verifyConfig, withFallback
public AdaptiveLoadBalancingGroup(MetricsSelector metricsSelector, scala.collection.immutable.Iterable<java.lang.String> paths, java.lang.String routerDispatcher)
public AdaptiveLoadBalancingGroup(com.typesafe.config.Config config, DynamicAccess dynamicAccess)
public AdaptiveLoadBalancingGroup(MetricsSelector metricsSelector, java.lang.Iterable<java.lang.String> routeesPaths)
metricsSelector
- decides what probability to use for selecting a routee, based
on remaining capacity as indicated by the node metricsrouteesPaths
- string representation of the actor paths of the routees, messages are
sent with ActorSelection
to these pathspublic static boolean isManagementMessage(java.lang.Object msg)
public static boolean stopRouterWhenAllRouteesRemoved()
public static RouterConfig withFallback(RouterConfig other)
public static void verifyConfig(ActorPath path)
public static Props props()
public static Routee routeeFor(java.lang.String path, ActorContext context)
public static RouterActor createRouterActor()
public abstract static boolean canEqual(java.lang.Object that)
public abstract static boolean equals(java.lang.Object that)
public abstract static java.lang.Object productElement(int n)
public abstract static int productArity()
public static scala.collection.Iterator<java.lang.Object> productIterator()
public static java.lang.String productPrefix()
public MetricsSelector metricsSelector()
public scala.collection.immutable.Iterable<java.lang.String> paths()
public java.lang.String routerDispatcher()
RouterConfig
routerDispatcher
in interface RouterConfig
public scala.collection.immutable.Iterable<java.lang.String> paths(ActorSystem system)
public Router createRouter(ActorSystem system)
RouterConfig
createRouter
in interface RouterConfig
system
- the ActorSystem this router belongs topublic scala.Option<Props> routingLogicController(RoutingLogic routingLogic)
RouterConfig
routingLogicController
in interface RouterConfig
routingLogic
- (undocumented)public AdaptiveLoadBalancingGroup withDispatcher(java.lang.String dispatcherId)
dispatcherId
- (undocumented)