Package akka.remote.routing
Class RemoteRouterConfig
- java.lang.Object
-
- 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, java.io.Serializable
RouterConfig
implementation for remote deployment on defined target nodes. Delegates other duties to the localPool
, which makes it possible to mix this with the built-in routers such asRoundRobinGroup
or custom routers.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RemoteRouterConfig(Pool local, Address[] nodes)
RemoteRouterConfig(Pool local, java.lang.Iterable<Address> nodes)
RemoteRouterConfig(Pool local, scala.collection.Iterable<Address> nodes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RemoteRouterConfig
apply(Pool local, scala.collection.Iterable<Address> nodes)
boolean
canEqual(java.lang.Object x$1)
RemoteRouterConfig
copy(Pool local, scala.collection.Iterable<Address> nodes)
Pool
copy$default$1()
scala.collection.Iterable<Address>
copy$default$2()
Router
createRouter(ActorSystem system)
Create the actual router, responsible for routing messages to routees.akka.routing.RouterActor
createRouterActor()
INTERNAL APIboolean
equals(java.lang.Object x$1)
int
hashCode()
Pool
local()
Routee
newRoutee(Props routeeProps, ActorContext context)
INTERNAL APIscala.collection.Iterable<Address>
nodes()
int
nrOfInstances(ActorSystem sys)
Initial number of routee instancesint
productArity()
java.lang.Object
productElement(int x$1)
java.lang.String
productElementName(int x$1)
scala.collection.Iterator<java.lang.Object>
productIterator()
java.lang.String
productPrefix()
scala.Option<Resizer>
resizer()
Pool with dynamically resizable number of routees return theResizer
to use.java.lang.String
routerDispatcher()
Dispatcher ID to use for running the “head” actor, which handles supervision, death watch and router management messagesSupervisorStrategy
supervisorStrategy()
SupervisorStrategy for the head actor, i.e.java.lang.String
toString()
static scala.Option<scala.Tuple2<Pool,scala.collection.Iterable<Address>>>
unapply(RemoteRouterConfig x$0)
RouterConfig
withFallback(RouterConfig other)
Overridable merge strategy, by default completely prefersthis
(i.e.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface akka.routing.Pool
enrichWithPoolDispatcher, props, stopRouterWhenAllRouteesRemoved, usePoolDispatcher
-
Methods inherited from interface akka.routing.RouterConfig
isManagementMessage, routingLogicController, verifyConfig
-
-
-
-
Method Detail
-
apply
public static RemoteRouterConfig apply(Pool local, scala.collection.Iterable<Address> nodes)
-
unapply
public static scala.Option<scala.Tuple2<Pool,scala.collection.Iterable<Address>>> unapply(RemoteRouterConfig x$0)
-
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 interfaceRouterConfig
- Parameters:
system
- the ActorSystem this router belongs to
-
nrOfInstances
public int nrOfInstances(ActorSystem sys)
Description copied from interface:Pool
Initial number of routee instances- Specified by:
nrOfInstances
in interfacePool
-
newRoutee
public Routee newRoutee(Props routeeProps, ActorContext context)
Description copied from interface:Pool
INTERNAL API
-
createRouterActor
public akka.routing.RouterActor createRouterActor()
Description copied from interface:Pool
INTERNAL API- Specified by:
createRouterActor
in interfacePool
- Specified by:
createRouterActor
in interfaceRouterConfig
-
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 interfacePool
-
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 interfaceRouterConfig
-
resizer
public scala.Option<Resizer> resizer()
Description copied from interface:Pool
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.
-
withFallback
public RouterConfig withFallback(RouterConfig other)
Description copied from interface:RouterConfig
Overridable merge strategy, by default completely prefersthis
(i.e. no merge).- Specified by:
withFallback
in interfaceRouterConfig
-
copy
public RemoteRouterConfig copy(Pool local, scala.collection.Iterable<Address> nodes)
-
copy$default$1
public Pool copy$default$1()
-
copy$default$2
public scala.collection.Iterable<Address> copy$default$2()
-
productPrefix
public java.lang.String productPrefix()
- Specified by:
productPrefix
in interfacescala.Product
-
productArity
public int productArity()
- Specified by:
productArity
in interfacescala.Product
-
productElement
public java.lang.Object productElement(int x$1)
- Specified by:
productElement
in interfacescala.Product
-
productIterator
public scala.collection.Iterator<java.lang.Object> productIterator()
- Specified by:
productIterator
in interfacescala.Product
-
canEqual
public boolean canEqual(java.lang.Object x$1)
- Specified by:
canEqual
in interfacescala.Equals
-
productElementName
public java.lang.String productElementName(int x$1)
- Specified by:
productElementName
in interfacescala.Product
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object x$1)
- Specified by:
equals
in interfacescala.Equals
- Overrides:
equals
in classjava.lang.Object
-
-