Class RoutingLogics.ConsistentHashingLogic<T>
java.lang.Object
org.apache.pekko.actor.typed.internal.routing.RoutingLogics.ConsistentHashingLogic<T>
- All Implemented Interfaces:
RoutingLogic<T>
- Enclosing class:
- RoutingLogics
public static final class RoutingLogics.ConsistentHashingLogic<T>
extends Object
implements RoutingLogic<T>
-
Constructor Summary
ConstructorsConstructorDescriptionConsistentHashingLogic(int virtualNodesFactor, scala.Function1<T, String> mapping, Address baseAddress) -
Method Summary
Modifier and TypeMethodDescriptionvoidrouteesUpdated(scala.collection.immutable.Set<ActorRef<T>> newRoutees) Invoked an initial time beforeselectRouteeis ever called and then every time the set of available routees changes.selectRoutee(T msg)
-
Constructor Details
-
ConsistentHashingLogic
-
-
Method Details
-
routeesUpdated
Description copied from interface:RoutingLogicInvoked an initial time beforeselectRouteeis ever called and then every time the set of available routees changes.- Specified by:
routeesUpdatedin interfaceRoutingLogic<T>- Parameters:
newRoutees- The updated set of routees. For a group router this could be empty, in that caseselectRoutee()will not be called beforerouteesUpdatedis invoked again with at least one routee. For a pool the pool stops instead of ever callingrouteesUpdatedwith an empty list of routees.
-
selectRoutee
- Specified by:
selectRouteein interfaceRoutingLogic<T>
-