Class RouterConfig
This class provides base functionality used in the creation and configuration of the various routers in the system.
Inherited Members
Namespace: Akka.Routing
Assembly: Akka.dll
Syntax
public abstract class RouterConfig : ISurrogated, IEquatable<RouterConfig>
Constructors
| Improve this Doc View SourceRouterConfig()
Initializes a new instance of the RouterConfig class.
Declaration
protected RouterConfig()
RouterConfig(String)
Initializes a new instance of the RouterConfig class.
note
This method defaults to setting the dispatcher to use the DefaultDispatcherId.
Declaration
protected RouterConfig(string routerDispatcher)
Parameters
Type | Name | Description |
---|---|---|
String | routerDispatcher | The dispatcher to use when passing messages to routees. |
Properties
| Improve this Doc View SourceRouterDispatcher
Dispatcher ID to use for running the "head" actor, which handles supervision, death watch and router management messages.
Declaration
public virtual string RouterDispatcher { get; }
Property Value
Type | Description |
---|---|
String |
StopRouterWhenAllRouteesRemoved
Specify that this router should stop itself when all routees have terminated (been removed).
By Default it is true
, unless a resizer
is used.
Declaration
public virtual bool StopRouterWhenAllRouteesRemoved { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
| Improve this Doc View SourceCreateRouter(ActorSystem)
Creates a router that is responsible for routing messages to routees within the provided system
.
Declaration
public abstract Router CreateRouter(ActorSystem system)
Parameters
Type | Name | Description |
---|---|---|
ActorSystem | system | The ActorSystem this router belongs to. |
Returns
Type | Description |
---|---|
Router | The newly created router tied to the given system. |
Equals(RouterConfig)
Declaration
public bool Equals(RouterConfig other)
Parameters
Type | Name | Description |
---|---|---|
RouterConfig | other |
Returns
Type | Description |
---|---|
Boolean |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
| Improve this Doc View SourceIsManagementMessage(Object)
Determines whether a provided message is handled by the router.
Declaration
public virtual bool IsManagementMessage(object message)
Parameters
Type | Name | Description |
---|---|---|
Object | message | The message to inspect. |
Returns
Type | Description |
---|---|
Boolean |
|
RoutingLogicController(RoutingLogic)
Possibility to define an actor for controlling the routing logic from external stimuli(e.g.monitoring metrics). This actor will be a child of the router "head" actor. Management messages not handled by the "head" actor are delegated to this controller actor.
Declaration
public virtual Props RoutingLogicController(RoutingLogic routingLogic)
Parameters
Type | Name | Description |
---|---|---|
RoutingLogic | routingLogic |
Returns
Type | Description |
---|---|
Props |
ToSurrogate(ActorSystem)
Creates a surrogate representation of the current router.
Declaration
public abstract ISurrogate ToSurrogate(ActorSystem system)
Parameters
Type | Name | Description |
---|---|---|
ActorSystem | system | The actor system that owns this router. |
Returns
Type | Description |
---|---|
ISurrogate | The surrogate representation of the current router. |
VerifyConfig(ActorPath)
Check that everything is there which is needed. Called in constructor of RoutedActorRef to fail early.
Declaration
public virtual void VerifyConfig(ActorPath path)
Parameters
Type | Name | Description |
---|---|---|
ActorPath | path | TBD |
WithFallback(RouterConfig)
Configure the current router with an auxiliary router for routes that it does not know how to handle.
Declaration
public virtual RouterConfig WithFallback(RouterConfig routerConfig)
Parameters
Type | Name | Description |
---|---|---|
RouterConfig | routerConfig | The router to use as an auxiliary source. |
Returns
Type | Description |
---|---|
RouterConfig | The router configured with the auxiliary information. |