Package akka.routing
Class FromConfig
- java.lang.Object
-
- akka.routing.FromConfig
-
- All Implemented Interfaces:
Pool
,RouterConfig
,java.io.Serializable
,scala.Serializable
- Direct Known Subclasses:
FromConfig$
public class FromConfig extends java.lang.Object implements Pool
INTERNAL API- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FromConfig()
FromConfig(scala.Option<Resizer> resizer, SupervisorStrategy supervisorStrategy, java.lang.String routerDispatcher)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static FromConfig
apply(scala.Option<Resizer> resizer, SupervisorStrategy supervisorStrategy, java.lang.String routerDispatcher)
static scala.Option<Resizer>
apply$default$1()
static SupervisorStrategy
apply$default$2()
static java.lang.String
apply$default$3()
static boolean
canEqual(java.lang.Object x$1)
Router
createRouter(ActorSystem system)
Create the actual router, responsible for routing messages to routees.RouterActor
createRouterActor()
INTERNAL APIstatic Props
enrichWithPoolDispatcher(Props routeeProps, ActorContext context)
abstract static boolean
equals(java.lang.Object that)
static FromConfig$
getInstance()
static int
hashCode()
static boolean
isManagementMessage(java.lang.Object msg)
static Routee
newRoutee(Props routeeProps, ActorContext context)
int
nrOfInstances(ActorSystem sys)
Initial number of routee instancesstatic int
productArity()
static java.lang.Object
productElement(int x$1)
static scala.collection.Iterator<java.lang.Object>
productIterator()
static java.lang.String
productPrefix()
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 theResizer
to use.java.lang.String
routerDispatcher()
Dispatcher ID to use for running the “head” actor, which handles supervision, death watch and router management messagesstatic scala.Option<Props>
routingLogicController(RoutingLogic routingLogic)
static boolean
stopRouterWhenAllRouteesRemoved()
SupervisorStrategy
supervisorStrategy()
SupervisorStrategy for the head actor, i.e.static java.lang.String
toString()
static scala.Option<java.lang.String>
unapply(FromConfig fc)
static boolean
usePoolDispatcher()
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.static RouterConfig
withFallback(RouterConfig other)
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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface akka.routing.Pool
enrichWithPoolDispatcher, newRoutee, props, stopRouterWhenAllRouteesRemoved, usePoolDispatcher
-
Methods inherited from interface akka.routing.RouterConfig
isManagementMessage, routingLogicController, withFallback
-
-
-
-
Constructor Detail
-
FromConfig
public FromConfig(scala.Option<Resizer> resizer, SupervisorStrategy supervisorStrategy, java.lang.String routerDispatcher)
-
FromConfig
public FromConfig()
-
-
Method Detail
-
getInstance
public static FromConfig$ getInstance()
-
apply
public static final FromConfig apply(scala.Option<Resizer> resizer, SupervisorStrategy supervisorStrategy, java.lang.String routerDispatcher)
-
apply$default$1
public static final scala.Option<Resizer> apply$default$1()
-
apply$default$2
public static final SupervisorStrategy apply$default$2()
-
apply$default$3
public static final java.lang.String apply$default$3()
-
unapply
public static final scala.Option<java.lang.String> unapply(FromConfig fc)
-
productPrefix
public static java.lang.String productPrefix()
-
productArity
public static int productArity()
-
productElement
public static java.lang.Object productElement(int x$1)
-
productIterator
public static scala.collection.Iterator<java.lang.Object> productIterator()
-
canEqual
public static boolean canEqual(java.lang.Object x$1)
-
hashCode
public static int hashCode()
-
toString
public static java.lang.String toString()
-
routingLogicController
public static scala.Option<Props> routingLogicController(RoutingLogic routingLogic)
-
isManagementMessage
public static boolean isManagementMessage(java.lang.Object msg)
-
withFallback
public static RouterConfig withFallback(RouterConfig other)
-
usePoolDispatcher
public static boolean usePoolDispatcher()
-
newRoutee
public static Routee newRoutee(Props routeeProps, ActorContext context)
-
enrichWithPoolDispatcher
public static Props enrichWithPoolDispatcher(Props routeeProps, ActorContext context)
-
stopRouterWhenAllRouteesRemoved
public static boolean stopRouterWhenAllRouteesRemoved()
-
equals
public abstract static boolean equals(java.lang.Object that)
-
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.
-
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
- Returns:
- (undocumented)
-
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
- Returns:
- (undocumented)
-
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- Returns:
- (undocumented)
-
createRouterActor
public RouterActor createRouterActor()
INTERNAL API- Specified by:
createRouterActor
in interfacePool
- Specified by:
createRouterActor
in interfaceRouterConfig
- Returns:
- (undocumented)
-
verifyConfig
public void verifyConfig(ActorPath path)
Description copied from interface:RouterConfig
Check that everything is there which is needed. Called in constructor of RoutedActorRef to fail early.- Specified by:
verifyConfig
in interfaceRouterConfig
- Parameters:
path
- (undocumented)
-
withSupervisorStrategy
public FromConfig withSupervisorStrategy(SupervisorStrategy strategy)
Setting the supervisor strategy to be used for the “head” Router actor.- Parameters:
strategy
- (undocumented)- Returns:
- (undocumented)
-
withResizer
public FromConfig withResizer(Resizer resizer)
Setting the resizer to be used.- Parameters:
resizer
- (undocumented)- Returns:
- (undocumented)
-
withDispatcher
public 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.- Parameters:
dispatcherId
- (undocumented)- Returns:
- (undocumented)
-
nrOfInstances
public int nrOfInstances(ActorSystem sys)
Description copied from interface:Pool
Initial number of routee instances- Specified by:
nrOfInstances
in interfacePool
- Parameters:
sys
- (undocumented)- Returns:
- (undocumented)
-
-