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
RoundRobinGroup or custom routers.| Constructor and Description |
|---|
RemoteRouterConfig(Pool local,
Address[] nodes) |
RemoteRouterConfig(Pool local,
scala.collection.Iterable<Address> nodes) |
RemoteRouterConfig(Pool local,
java.lang.Iterable<Address> nodes) |
| Modifier and Type | Method and Description |
|---|---|
abstract static boolean |
canEqual(java.lang.Object that) |
Router |
createRouter(ActorSystem system)
Create the actual router, responsible for routing messages to routees.
|
RouterActor |
createRouterActor()
INTERNAL API
|
static Props |
enrichWithPoolDispatcher(Props routeeProps,
ActorContext context) |
abstract static boolean |
equals(java.lang.Object that) |
static boolean |
isManagementMessage(java.lang.Object msg) |
Pool |
local() |
Routee |
newRoutee(Props routeeProps,
ActorContext context)
INTERNAL API
|
scala.collection.Iterable<Address> |
nodes() |
int |
nrOfInstances(ActorSystem sys)
Initial number of routee instances
|
abstract static int |
productArity() |
abstract static java.lang.Object |
productElement(int n) |
static scala.collection.Iterator<java.lang.Object> |
productIterator() |
static java.lang.String |
productPrefix() |
static Props |
props(Props routeeProps) |
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
|
static scala.Option<Props> |
routingLogicController(RoutingLogic routingLogic) |
static boolean |
stopRouterWhenAllRouteesRemoved() |
SupervisorStrategy |
supervisorStrategy()
SupervisorStrategy for the head actor, i.e.
|
static boolean |
usePoolDispatcher() |
static void |
verifyConfig(ActorPath path) |
RouterConfig |
withFallback(RouterConfig other)
Overridable merge strategy, by default completely prefers
this (i.e. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitenrichWithPoolDispatcher, nrOfInstances, props, stopRouterWhenAllRouteesRemoved, usePoolDispatcherisManagementMessage, routingLogicController, verifyConfigpublic static scala.Option<Props> routingLogicController(RoutingLogic routingLogic)
public static boolean isManagementMessage(java.lang.Object msg)
public static void verifyConfig(ActorPath path)
public static boolean usePoolDispatcher()
public static Props enrichWithPoolDispatcher(Props routeeProps, ActorContext context)
public static boolean stopRouterWhenAllRouteesRemoved()
public abstract static boolean canEqual(java.lang.Object that)
public abstract static boolean equals(java.lang.Object that)
public abstract static java.lang.Object productElement(int n)
public abstract static int productArity()
public static scala.collection.Iterator<java.lang.Object> productIterator()
public static java.lang.String productPrefix()
public Pool local()
public scala.collection.Iterable<Address> nodes()
public Router createRouter(ActorSystem system)
RouterConfigcreateRouter in interface RouterConfigsystem - the ActorSystem this router belongs topublic int nrOfInstances(ActorSystem sys)
PoolnrOfInstances in interface Poolsys - (undocumented)public Routee newRoutee(Props routeeProps, ActorContext context)
Poolpublic RouterActor createRouterActor()
PoolcreateRouterActor in interface PoolcreateRouterActor in interface RouterConfigpublic SupervisorStrategy supervisorStrategy()
PoolsupervisorStrategy in interface Poolpublic java.lang.String routerDispatcher()
RouterConfigrouterDispatcher in interface RouterConfigpublic scala.Option<Resizer> resizer()
PoolResizer
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.public RouterConfig withFallback(RouterConfig other)
RouterConfigthis (i.e. no merge).withFallback in interface RouterConfigother - (undocumented)