|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object akka.cluster.routing.ClusterRouterConfig
public final class ClusterRouterConfig
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.
Constructor Summary | |
---|---|
ClusterRouterConfig(RouterConfig local,
ClusterRouterSettings settings)
|
Method Summary | |
---|---|
Router |
createActor()
The router "head" actor. |
scala.PartialFunction<scala.Tuple2<ActorRef,java.lang.Object>,scala.collection.immutable.Iterable<Destination>> |
createRoute(RouteeProvider routeeProvider)
Implement the routing logic by returning a partial function of partial function from (sender, message) to a set of destinations. |
akka.cluster.routing.ClusterRouteeProvider |
createRouteeProvider(ActorContext context,
Props routeeProps)
The RouteeProvider responsible for creating or
looking up routees. |
RouterConfig |
local()
|
scala.Option<Resizer> |
resizer()
Routers with dynamically resizable number of routees return the Resizer
to use. |
java.lang.String |
routerDispatcher()
Dispatcher ID to use for running the “head” actor, i.e. |
ClusterRouterSettings |
settings()
|
boolean |
stopRouterWhenAllRouteesRemoved()
|
SupervisorStrategy |
supervisorStrategy()
SupervisorStrategy for the created Router actor. |
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.RouterConfig |
---|
toAll, verifyConfig |
Methods inherited from interface scala.Product |
---|
productArity, productElement, productIterator, productPrefix |
Methods inherited from interface scala.Equals |
---|
canEqual, equals |
Constructor Detail |
---|
public ClusterRouterConfig(RouterConfig local, ClusterRouterSettings settings)
Method Detail |
---|
public RouterConfig local()
public ClusterRouterSettings settings()
public akka.cluster.routing.ClusterRouteeProvider createRouteeProvider(ActorContext context, Props routeeProps)
RouterConfig
RouteeProvider
responsible for creating or
looking up routees. It's used in createRoute
to register routees,
and also from Resizer
.
createRouteeProvider
in interface RouterConfig
public scala.PartialFunction<scala.Tuple2<ActorRef,java.lang.Object>,scala.collection.immutable.Iterable<Destination>> createRoute(RouteeProvider routeeProvider)
RouterConfig
Route
will be applied for each incoming message.
When createRoute
is called the routees should also be registered,
typically by using createRoutees
or registerRouteesFor
of the
supplied RouteeProvider
.
createRoute
in interface RouterConfig
public Router createActor()
RouterConfig
createActor
in interface RouterConfig
public SupervisorStrategy supervisorStrategy()
RouterConfig
supervisorStrategy
in interface RouterConfig
public java.lang.String routerDispatcher()
RouterConfig
Router
.
routerDispatcher
in interface RouterConfig
public scala.Option<Resizer> resizer()
RouterConfig
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.
resizer
in interface RouterConfig
public boolean stopRouterWhenAllRouteesRemoved()
stopRouterWhenAllRouteesRemoved
in interface RouterConfig
public RouterConfig withFallback(RouterConfig other)
RouterConfig
withFallback
in interface RouterConfig
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |