akka.remote.routing
Class RemoteRouterConfig

java.lang.Object
  extended by akka.remote.routing.RemoteRouterConfig
All Implemented Interfaces:
Pool, RouterConfig, java.io.Serializable, scala.Equals, scala.Product

public final class RemoteRouterConfig
extends java.lang.Object
implements Pool, scala.Product, scala.Serializable

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

See Also:
Serialized Form

Constructor Summary
RemoteRouterConfig(Pool local, Address[] nodes)
           
RemoteRouterConfig(Pool local, scala.collection.Iterable<Address> nodes)
           
RemoteRouterConfig(Pool local, java.lang.Iterable<Address> nodes)
           
 
Method Summary
 Router createRouter(ActorSystem system)
          Create the actual router, responsible for routing messages to routees.
 RouterActor createRouterActor()
          INTERNAL API
 Pool local()
           
 Routee newRoutee(Props routeeProps, ActorContext context)
          INTERNAL API
 scala.collection.Iterable<Address> nodes()
           
 int nrOfInstances()
          Initial number of routee instances
 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 &ldquo;head&rdquo; actor, which handles supervision, death watch and router management messages
 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.Pool
enrichWithPoolDispatcher, props, stopRouterWhenAllRouteesRemoved, usePoolDispatcher
 
Methods inherited from interface akka.routing.RouterConfig
isManagementMessage, routingLogicController, verifyConfig
 
Methods inherited from interface scala.Product
productArity, productElement, productIterator, productPrefix
 
Methods inherited from interface scala.Equals
canEqual, equals
 

Constructor Detail

RemoteRouterConfig

public RemoteRouterConfig(Pool local,
                          scala.collection.Iterable<Address> nodes)

RemoteRouterConfig

public RemoteRouterConfig(Pool local,
                          java.lang.Iterable<Address> nodes)

RemoteRouterConfig

public RemoteRouterConfig(Pool local,
                          Address[] nodes)
Method Detail

local

public Pool local()

nodes

public scala.collection.Iterable<Address> nodes()

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
Returns:
(undocumented)

nrOfInstances

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

Specified by:
nrOfInstances in interface Pool
Returns:
(undocumented)

newRoutee

public Routee newRoutee(Props routeeProps,
                        ActorContext context)
Description copied from interface: Pool
INTERNAL API

Specified by:
newRoutee in interface Pool
Parameters:
routeeProps - (undocumented)
context - (undocumented)
Returns:
(undocumented)

createRouterActor

public RouterActor createRouterActor()
Description copied from interface: Pool
INTERNAL API

Specified by:
createRouterActor in interface Pool
Specified by:
createRouterActor in interface RouterConfig
Returns:
(undocumented)

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
Returns:
(undocumented)

routerDispatcher

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

Specified by:
routerDispatcher in interface RouterConfig
Returns:
(undocumented)

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
Returns:
(undocumented)

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
Parameters:
other - (undocumented)
Returns:
(undocumented)