public class FromConfig extends java.lang.Object implements Pool
This can be used when the dispatcher to be used for the head Router needs to be configured (defaults to default-dispatcher).
| Constructor and Description |
|---|
FromConfig() |
FromConfig(scala.Option<Resizer> resizer,
SupervisorStrategy supervisorStrategy,
java.lang.String routerDispatcher) |
| Modifier and Type | Method and Description |
|---|---|
static FromConfig |
apply(scala.Option<Resizer> resizer,
SupervisorStrategy supervisorStrategy,
java.lang.String routerDispatcher) |
Router |
createRouter(ActorSystem system)
Create the actual router, responsible for routing messages to routees.
|
static FromConfig$ |
getInstance()
Java API: get the singleton instance
|
int |
nrOfInstances()
Initial number of routee instances
|
Props |
props()
Props for a group router based on the settings defined by
this instance. |
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
|
SupervisorStrategy |
supervisorStrategy()
SupervisorStrategy for the head actor, i.e.
|
static scala.Option<java.lang.String> |
unapply(FromConfig fc) |
void |
verifyConfig(ActorPath path)
Check that everything is there which is needed.
|
FromConfig |
withDispatcher(java.lang.String dispatcherId)
Setting the dispatcher to be used for the router head actor, which handles
supervision, death watch and router management messages.
|
FromConfig |
withResizer(Resizer resizer)
Setting the resizer to be used.
|
FromConfig |
withSupervisorStrategy(SupervisorStrategy strategy)
Setting the supervisor strategy to be used for the “head” Router actor.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdefaultSupervisorStrategy, enrichWithPoolDispatcher, newRoutee, props, stopRouterWhenAllRouteesRemoved, usePoolDispatcherisManagementMessage, routingLogicController, withFallbackpublic FromConfig(scala.Option<Resizer> resizer, SupervisorStrategy supervisorStrategy, java.lang.String routerDispatcher)
public FromConfig()
public static FromConfig$ getInstance()
public static final FromConfig apply(scala.Option<Resizer> resizer, SupervisorStrategy supervisorStrategy, java.lang.String routerDispatcher)
public static final scala.Option<java.lang.String> unapply(FromConfig fc)
public 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 SupervisorStrategy supervisorStrategy()
PoolsupervisorStrategy in interface Poolpublic java.lang.String routerDispatcher()
RouterConfigrouterDispatcher in interface RouterConfigpublic Router createRouter(ActorSystem system)
RouterConfigcreateRouter in interface RouterConfigsystem - the ActorSystem this router belongs topublic void verifyConfig(ActorPath path)
RouterConfigverifyConfig in interface RouterConfigpublic FromConfig withSupervisorStrategy(SupervisorStrategy strategy)
public FromConfig withResizer(Resizer resizer)
public FromConfig withDispatcher(java.lang.String dispatcherId)
public int nrOfInstances()
PoolnrOfInstances in interface Pool