Package org.apache.pekko.routing
Interface Pool
- All Superinterfaces:
RouterConfig,Serializable
- All Known Subinterfaces:
PoolOverrideUnsetConfig<T>
- All Known Implementing Classes:
AdaptiveLoadBalancingPool,BalancingPool,BroadcastPool,ClusterRouterPool,ConsistentHashingPool,FromConfig,FromConfig$,PoolBase,RandomPool,RemoteRouterConfig,RoundRobinPool,ScatterGatherFirstCompletedPool,SmallestMailboxPool,TailChoppingPool
RouterConfig for router actor that creates routees as child actors and removes
them from the router if they terminate.-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.pekko.routing.RouterActorINTERNAL APIenrichWithPoolDispatcher(Props routeeProps, ActorContext context) INTERNAL APInewRoutee(Props routeeProps, ActorContext context) INTERNAL APIintnrOfInstances(ActorSystem sys) Initial number of routee instancespekko.actor.Propsfor a pool router based on the settings defined by this instance and the suppliedpekko.actor.Propsfor the routees created by the router.scala.Option<Resizer>resizer()Pool with dynamically resizable number of routees return thepekko.routing.Resizerto use.booleanSpecify that this router should stop itself when all routees have terminated (been removed).SupervisorStrategy for the head actor, i.e.booleanUse a dedicated dispatcher for the routees of the pool.Methods inherited from interface org.apache.pekko.routing.RouterConfig
createRouter, isManagementMessage, routerDispatcher, routingLogicController, verifyConfig, withFallback
-
Method Details
-
nrOfInstances
Initial number of routee instances -
usePoolDispatcher
boolean usePoolDispatcher()Use a dedicated dispatcher for the routees of the pool. The dispatcher is defined in 'pool-dispatcher' configuration property in the deployment section of the router. -
newRoutee
INTERNAL API -
enrichWithPoolDispatcher
INTERNAL API -
resizer
scala.Option<Resizer> resizer()Pool with dynamically resizable number of routees return thepekko.routing.Resizerto use. The resizer is invoked once when the router is created, before any messages can be sent to it. Resize is also triggered when messages are sent to the routees, and the resizer is invoked asynchronously, i.e. not necessarily before the message has been sent. -
supervisorStrategy
SupervisorStrategy supervisorStrategy()SupervisorStrategy for the head actor, i.e. for supervising the routees of the pool. -
props
pekko.actor.Propsfor a pool router based on the settings defined by this instance and the suppliedpekko.actor.Propsfor the routees created by the router. -
stopRouterWhenAllRouteesRemoved
boolean stopRouterWhenAllRouteesRemoved()Specify that this router should stop itself when all routees have terminated (been removed). By Default it istrue, unless aresizeris used.- Specified by:
stopRouterWhenAllRouteesRemovedin interfaceRouterConfig
-
createRouterActor
org.apache.pekko.routing.RouterActor createRouterActor()INTERNAL API- Specified by:
createRouterActorin interfaceRouterConfig
-