akka.cluster.routing
Class ClusterRouterConfig

java.lang.Object
  extended by akka.cluster.routing.ClusterRouterConfig
All Implemented Interfaces:
DeprecatedRouterConfig, Group, Pool, RouterConfig, java.io.Serializable, scala.Equals, scala.Product

public final class ClusterRouterConfig
extends java.lang.Object
implements DeprecatedRouterConfig, scala.Product, scala.Serializable

Java API: Settings for lookup of the routees

See Also:
Serialized Form

Constructor Summary
ClusterRouterConfig(DeprecatedRouterConfig local, ClusterRouterSettings settings)
           
 
Method Summary
 Router createRouter(ActorSystem system)
          Create the actual router, responsible for routing messages to routees.
 boolean isManagementMessage(java.lang.Object msg)
          Is the message handled by the router head actor or the RouterConfig.routingLogicController(akka.routing.RoutingLogic) actor.
 DeprecatedRouterConfig local()
           
 int nrOfInstances()
          Initial number of routee instances
 scala.collection.immutable.Iterable<java.lang.String> paths()
           
 scala.Option<Resizer> resizer()
          Pool with dynamically resizable number of routees return the Resizer to use.
 java.lang.String routerDispatcher()
          Dispatcher ID to use for running the “head” actor, which handles supervision, death watch and router management messages
 scala.Option<Props> routingLogicController(RoutingLogic routingLogic)
          Possibility to define an actor for controlling the routing logic from external stimuli (e.g.
 ClusterRouterSettings settings()
           
 boolean stopRouterWhenAllRouteesRemoved()
           
 SupervisorStrategy supervisorStrategy()
          SupervisorStrategy for the head actor, i.e.
 RouterConfig withFallback(RouterConfig other)
          Overridable merge strategy, by default completely prefers this (i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface akka.routing.Group
props, routeeFor
 
Methods inherited from interface akka.routing.Pool
defaultSupervisorStrategy, enrichWithPoolDispatcher, props, stopRouterWhenAllRouteesRemoved, usePoolDispatcher
 
Methods inherited from interface akka.routing.RouterConfig
createRouter, isManagementMessage, routerDispatcher, routingLogicController, verifyConfig
 
Methods inherited from interface scala.Product
productArity, productElement, productIterator, productPrefix
 
Methods inherited from interface scala.Equals
canEqual, equals
 

Constructor Detail

ClusterRouterConfig

public ClusterRouterConfig(DeprecatedRouterConfig local,
                           ClusterRouterSettings settings)
Method Detail

local

public DeprecatedRouterConfig local()

settings

public ClusterRouterSettings settings()

nrOfInstances

public int nrOfInstances()
Description copied from interface: Pool
Initial number of routee instances

Specified by:
nrOfInstances in interface Pool

paths

public scala.collection.immutable.Iterable<java.lang.String> paths()
Specified by:
paths in interface Group

resizer

public scala.Option<Resizer> resizer()
Description copied from interface: Pool
Pool with dynamically resizable number of routees return the Resizer 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.

Specified by:
resizer in interface Pool

supervisorStrategy

public SupervisorStrategy supervisorStrategy()
Description copied from interface: Pool
SupervisorStrategy for the head actor, i.e. for supervising the routees of the pool.

Specified by:
supervisorStrategy in interface Pool

withFallback

public RouterConfig withFallback(RouterConfig other)
Description copied from interface: RouterConfig
Overridable merge strategy, by default completely prefers this (i.e. no merge).

Specified by:
withFallback in interface RouterConfig

createRouter

public Router createRouter(ActorSystem system)
Description copied from interface: RouterConfig
Create the actual router, responsible for routing messages to routees.

Specified by:
createRouter in interface RouterConfig
Parameters:
system - the ActorSystem this router belongs to

routerDispatcher

public java.lang.String routerDispatcher()
Description copied from interface: RouterConfig
Dispatcher ID to use for running the “head” actor, which handles supervision, death watch and router management messages

Specified by:
routerDispatcher in interface RouterConfig

stopRouterWhenAllRouteesRemoved

public boolean stopRouterWhenAllRouteesRemoved()
Specified by:
stopRouterWhenAllRouteesRemoved in interface RouterConfig

routingLogicController

public scala.Option<Props> routingLogicController(RoutingLogic routingLogic)
Description copied from interface: RouterConfig
Possibility to define an actor for controlling the routing logic from external stimuli (e.g. monitoring metrics). This actor will be a child of the router "head" actor. Managment messages not handled by the "head" actor are delegated to this controller actor.

Specified by:
routingLogicController in interface RouterConfig

isManagementMessage

public boolean isManagementMessage(java.lang.Object msg)
Description copied from interface: RouterConfig
Is the message handled by the router head actor or the RouterConfig.routingLogicController(akka.routing.RoutingLogic) actor.

Specified by:
isManagementMessage in interface RouterConfig