Class ClusterRouterPool
RouterConfig implementation for deployment on cluster nodes. Delegates other duties to the local RouterConfig, which makes it possible to mix this with built-in routers such as RoundRobinGroup or custom routers.
Inherited Members
Namespace: Akka.Cluster.Routing
Assembly: Akka.Cluster.dll
Syntax
public sealed class ClusterRouterPool : Pool, ISurrogated, IEquatable<RouterConfig>, IEquatable<Pool>
Constructors
| Edit this page View SourceClusterRouterPool(Pool, ClusterRouterPoolSettings)
Initializes a new instance of the ClusterRouterPool class.
Declaration
public ClusterRouterPool(Pool local, ClusterRouterPoolSettings settings)
Parameters
Type | Name | Description |
---|---|---|
Pool | local | TBD |
ClusterRouterPoolSettings | settings | TBD |
Exceptions
Type | Condition |
---|---|
ConfigurationException | This exception is thrown when the resizer in the specified pool |
Properties
| Edit this page View SourceLocal
TBD
Declaration
public Pool Local { get; }
Property Value
Type | Description |
---|---|
Pool |
RouterDispatcher
Dispatcher ID to use for running the "head" actor, which handles supervision, death watch and router management messages.
Declaration
public override string RouterDispatcher { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
| Edit this page View SourceSettings
TBD
Declaration
public ClusterRouterPoolSettings Settings { get; }
Property Value
Type | Description |
---|---|
ClusterRouterPoolSettings |
StopRouterWhenAllRouteesRemoved
Specify that this router should stop itself when all routees have terminated (been removed).
Declaration
public override bool StopRouterWhenAllRouteesRemoved { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceSupervisorStrategy
Retrieve the strategy to use when supervising the pool.
Declaration
public override SupervisorStrategy SupervisorStrategy { get; }
Property Value
Type | Description |
---|---|
SupervisorStrategy |
Overrides
Methods
| Edit this page View SourceCreateRouter(ActorSystem)
Creates a router that is responsible for routing messages to routees within the provided system
.
Declaration
public override 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. |
Overrides
| Edit this page View SourceCreateRouterActor()
The router "head" actor.
Declaration
public override ActorBase CreateRouterActor()
Returns
Type | Description |
---|---|
ActorBase |
Overrides
Remarks
WARNING: make sure you know what you're doing before you attempt to implement this method.
Should only return Akka.Routing.RoutedActorRef types.
GetNrOfInstances(ActorSystem)
Returns the initial number of routees
Declaration
public override int GetNrOfInstances(ActorSystem system)
Parameters
Type | Name | Description |
---|---|---|
ActorSystem | system | The actor system to which this router belongs. |
Returns
Type | Description |
---|---|
int | The initial number of routees |
Overrides
| Edit this page View SourceIsManagementMessage(object)
Determines whether a provided message is handled by the router.
Declaration
public override bool IsManagementMessage(object message)
Parameters
Type | Name | Description |
---|---|---|
object | message | The message to inspect. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
| Edit this page View SourceRoutingLogicController(RoutingLogic)
TBD
Declaration
public override Props RoutingLogicController(RoutingLogic routingLogic)
Parameters
Type | Name | Description |
---|---|---|
RoutingLogic | routingLogic | TBD |
Returns
Type | Description |
---|---|
Props | TBD |
Overrides
| Edit this page View SourceToSurrogate(ActorSystem)
N/A
Declaration
public override ISurrogate ToSurrogate(ActorSystem system)
Parameters
Type | Name | Description |
---|---|---|
ActorSystem | system | N/A |
Returns
Type | Description |
---|---|
ISurrogate | N/A |
Overrides
Exceptions
Type | Condition |
---|---|
NotImplementedException | This exception is thrown automatically since surrogates aren't supported by this router. |
WithFallback(RouterConfig)
Configure the current router with an auxiliary router for routes that it does not know how to handle.
Declaration
public override 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. |
Overrides
Exceptions
Type | Condition |
---|---|
ConfigurationException | This exception is thrown when the specified router is another ClusterRouterPool. This configuration is not allowed. |