Package akka.routing
Interface Pool
-
- All Superinterfaces:
RouterConfig
,java.io.Serializable
- All Known Subinterfaces:
PoolOverrideUnsetConfig<T>
- All Known Implementing Classes:
AdaptiveLoadBalancingPool
,BalancingPool
,BroadcastPool
,ClusterRouterPool
,ConsistentHashingPool
,FromConfig
,FromConfig$
,PoolBase
,RandomPool
,RemoteRouterConfig
,RoundRobinPool
,ScatterGatherFirstCompletedPool
,SmallestMailboxPool
,TailChoppingPool
public interface Pool extends RouterConfig
RouterConfig
for router actor that creates routees as child actors and removes them from the router if they terminate.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description akka.routing.RouterActor
createRouterActor()
INTERNAL APIProps
enrichWithPoolDispatcher(Props routeeProps, ActorContext context)
INTERNAL APIRoutee
newRoutee(Props routeeProps, ActorContext context)
INTERNAL APIint
nrOfInstances(ActorSystem sys)
Initial number of routee instancesProps
props(Props routeeProps)
scala.Option<Resizer>
resizer()
Pool with dynamically resizable number of routees return theResizer
to use.boolean
stopRouterWhenAllRouteesRemoved()
SupervisorStrategy
supervisorStrategy()
SupervisorStrategy for the head actor, i.e.boolean
usePoolDispatcher()
Use a dedicated dispatcher for the routees of the pool.-
Methods inherited from interface akka.routing.RouterConfig
createRouter, isManagementMessage, routerDispatcher, routingLogicController, verifyConfig, withFallback
-
-
-
-
Method Detail
-
nrOfInstances
int nrOfInstances(ActorSystem sys)
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
Routee newRoutee(Props routeeProps, ActorContext context)
INTERNAL API
-
enrichWithPoolDispatcher
Props enrichWithPoolDispatcher(Props routeeProps, ActorContext context)
INTERNAL API
-
resizer
scala.Option<Resizer> resizer()
Pool with dynamically resizable number of routees return theResizer
to 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.
-
stopRouterWhenAllRouteesRemoved
boolean stopRouterWhenAllRouteesRemoved()
- Specified by:
stopRouterWhenAllRouteesRemoved
in interfaceRouterConfig
-
createRouterActor
akka.routing.RouterActor createRouterActor()
INTERNAL API- Specified by:
createRouterActor
in interfaceRouterConfig
-
-