public final class AdaptiveLoadBalancingGroup
extends java.lang.Object
implements akka.routing.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,
akka.actor.DynamicAccess dynamicAccess) |
AdaptiveLoadBalancingGroup(MetricsSelector metricsSelector,
java.lang.Iterable<java.lang.String> routeesPaths)
Java API
|
AdaptiveLoadBalancingGroup(MetricsSelector metricsSelector,
scala.collection.immutable.Iterable<java.lang.String> paths,
java.lang.String routerDispatcher) |
Modifier and Type | Method and Description |
---|---|
akka.routing.Router |
createRouter(akka.actor.ActorSystem system) |
MetricsSelector |
metricsSelector() |
scala.collection.immutable.Iterable<java.lang.String> |
paths() |
scala.collection.immutable.Iterable<java.lang.String> |
paths(akka.actor.ActorSystem system) |
java.lang.String |
routerDispatcher() |
scala.Option<akka.actor.Props> |
routingLogicController(akka.routing.RoutingLogic routingLogic) |
AdaptiveLoadBalancingGroup |
withDispatcher(java.lang.String dispatcherId)
Setting the dispatcher to be used for the router head actor, which handles
router management messages
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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, akka.actor.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 MetricsSelector metricsSelector()
public scala.collection.immutable.Iterable<java.lang.String> paths()
paths
in interface akka.routing.Group
public java.lang.String routerDispatcher()
routerDispatcher
in interface akka.routing.RouterConfig
public scala.collection.immutable.Iterable<java.lang.String> paths(akka.actor.ActorSystem system)
paths
in interface akka.routing.Group
public akka.routing.Router createRouter(akka.actor.ActorSystem system)
createRouter
in interface akka.routing.RouterConfig
public scala.Option<akka.actor.Props> routingLogicController(akka.routing.RoutingLogic routingLogic)
routingLogicController
in interface akka.routing.RouterConfig
public AdaptiveLoadBalancingGroup withDispatcher(java.lang.String dispatcherId)
dispatcherId
- (undocumented)