akka.cluster.routing
Class ClusterRouterGroup

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

public final class ClusterRouterGroup
extends java.lang.Object
implements Group, scala.Product, scala.Serializable

RouterConfig implementation for deployment on cluster nodes. Delegates other duties to the local RouterConfig, which makes it possible to mix this with the built-in routers such as RoundRobinRouter or custom routers.

See Also:
Serialized Form

Constructor Summary
ClusterRouterGroup(Group local, ClusterRouterGroupSettings 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.
 Group local()
           
 scala.collection.immutable.Iterable<java.lang.String> paths()
           
 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.
 ClusterRouterGroupSettings settings()
           
 boolean stopRouterWhenAllRouteesRemoved()
           
 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.RouterConfig
verifyConfig
 
Methods inherited from interface scala.Product
productArity, productElement, productIterator, productPrefix
 
Methods inherited from interface scala.Equals
canEqual, equals
 

Constructor Detail

ClusterRouterGroup

public ClusterRouterGroup(Group local,
                          ClusterRouterGroupSettings settings)
Method Detail

local

public Group local()

settings

public ClusterRouterGroupSettings settings()

paths

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

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