public final class AdaptiveLoadBalancingRoutingLogic
extends java.lang.Object
implements akka.routing.RoutingLogic, akka.actor.NoSerializationVerificationNeeded, scala.Product, scala.Serializable
It uses random selection of routees based on probabilities derived from the remaining capacity of corresponding node.
param: system the actor system hosting this router
param: metricsSelector decides what probability to use for selecting a routee, based on remaining capacity as indicated by the node metrics
Constructor and Description |
---|
AdaptiveLoadBalancingRoutingLogic(akka.actor.ActorSystem system,
MetricsSelector metricsSelector) |
Modifier and Type | Method and Description |
---|---|
void |
metricsChanged(ClusterEvent.ClusterMetricsChanged event) |
MetricsSelector |
metricsSelector() |
akka.routing.Routee |
select(java.lang.Object message,
scala.collection.immutable.IndexedSeq<akka.routing.Routee> routees) |
akka.actor.ActorSystem |
system() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public AdaptiveLoadBalancingRoutingLogic(akka.actor.ActorSystem system, MetricsSelector metricsSelector)
public akka.actor.ActorSystem system()
public MetricsSelector metricsSelector()
public final void metricsChanged(ClusterEvent.ClusterMetricsChanged event)
public akka.routing.Routee select(java.lang.Object message, scala.collection.immutable.IndexedSeq<akka.routing.Routee> routees)
select
in interface akka.routing.RoutingLogic