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
RouterConfigimplementation 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 asRoundRobinGroupor 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 RemoteRouterConfigapply(Pool local, scala.collection.Iterable<Address> nodes)booleancanEqual(java.lang.Object x$1)RemoteRouterConfigcopy(Pool local, scala.collection.Iterable<Address> nodes)Poolcopy$default$1()scala.collection.Iterable<Address>copy$default$2()RoutercreateRouter(ActorSystem system)Create the actual router, responsible for routing messages to routees.akka.routing.RouterActorcreateRouterActor()INTERNAL APIbooleanequals(java.lang.Object x$1)inthashCode()Poollocal()RouteenewRoutee(Props routeeProps, ActorContext context)INTERNAL APIscala.collection.Iterable<Address>nodes()intnrOfInstances(ActorSystem sys)Initial number of routee instancesintproductArity()java.lang.ObjectproductElement(int x$1)java.lang.StringproductElementName(int x$1)scala.collection.Iterator<java.lang.Object>productIterator()java.lang.StringproductPrefix()scala.Option<Resizer>resizer()Pool with dynamically resizable number of routees return theResizerto use.java.lang.StringrouterDispatcher()Dispatcher ID to use for running the “head” actor, which handles supervision, death watch and router management messagesSupervisorStrategysupervisorStrategy()SupervisorStrategy for the head actor, i.e.java.lang.StringtoString()static scala.Option<scala.Tuple2<Pool,scala.collection.Iterable<Address>>>unapply(RemoteRouterConfig x$0)RouterConfigwithFallback(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:RouterConfigCreate the actual router, responsible for routing messages to routees.- Specified by:
createRouterin interfaceRouterConfig- Parameters:
system- the ActorSystem this router belongs to
-
nrOfInstances
public int nrOfInstances(ActorSystem sys)
Description copied from interface:PoolInitial number of routee instances- Specified by:
nrOfInstancesin interfacePool
-
newRoutee
public Routee newRoutee(Props routeeProps, ActorContext context)
Description copied from interface:PoolINTERNAL API
-
createRouterActor
public akka.routing.RouterActor createRouterActor()
Description copied from interface:PoolINTERNAL API- Specified by:
createRouterActorin interfacePool- Specified by:
createRouterActorin interfaceRouterConfig
-
supervisorStrategy
public SupervisorStrategy supervisorStrategy()
Description copied from interface:PoolSupervisorStrategy for the head actor, i.e. for supervising the routees of the pool.- Specified by:
supervisorStrategyin interfacePool
-
routerDispatcher
public java.lang.String routerDispatcher()
Description copied from interface:RouterConfigDispatcher ID to use for running the “head” actor, which handles supervision, death watch and router management messages- Specified by:
routerDispatcherin interfaceRouterConfig
-
resizer
public scala.Option<Resizer> resizer()
Description copied from interface:PoolPool with dynamically resizable number of routees return theResizerto 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:RouterConfigOverridable merge strategy, by default completely prefersthis(i.e. no merge).- Specified by:
withFallbackin 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:
productPrefixin interfacescala.Product
-
productArity
public int productArity()
- Specified by:
productArityin interfacescala.Product
-
productElement
public java.lang.Object productElement(int x$1)
- Specified by:
productElementin interfacescala.Product
-
productIterator
public scala.collection.Iterator<java.lang.Object> productIterator()
- Specified by:
productIteratorin interfacescala.Product
-
canEqual
public boolean canEqual(java.lang.Object x$1)
- Specified by:
canEqualin interfacescala.Equals
-
productElementName
public java.lang.String productElementName(int x$1)
- Specified by:
productElementNamein interfacescala.Product
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object x$1)
- Specified by:
equalsin interfacescala.Equals- Overrides:
equalsin classjava.lang.Object
-
-