Class Pool
This class provides base functionality for all pool routers in the system. Pool routers are routers that create their own routees based on the provided configuration.
Inheritance
Inherited Members
Namespace: Akka.Routing
Assembly: Akka.dll
Syntax
public abstract class Pool : RouterConfig, ISurrogated, IEquatable<RouterConfig>, IEquatable<Pool>
Constructors
| Edit this page View SourcePool(int, Resizer, SupervisorStrategy, string, bool)
Initializes a new instance of the Pool class.
note
If a routerDispatcher is not provided, this constructor sets up
the pool to use the default dispatcher DefaultDispatcherId.
Declaration
protected Pool(int nrOfInstances, Resizer resizer, SupervisorStrategy supervisorStrategy, string routerDispatcher, bool usePoolDispatcher)
Parameters
| Type | Name | Description |
|---|---|---|
| int | nrOfInstances | The initial number of routees in the pool. |
| Resizer | resizer | The resizer to use when dynamically allocating routees to the pool. |
| SupervisorStrategy | supervisorStrategy | The strategy to use when supervising the pool. |
| string | routerDispatcher | The dispatcher to use when passing messages to the routees. |
| bool | usePoolDispatcher |
|
Properties
| Edit this page View SourceDefaultSupervisorStrategy
TBD
Declaration
public static SupervisorStrategy DefaultSupervisorStrategy { get; }
Property Value
| Type | Description |
|---|---|
| SupervisorStrategy |
NrOfInstances
Retrieves the current number of routees in the pool.
Declaration
public int NrOfInstances { get; }
Property Value
| Type | Description |
|---|---|
| int |
Resizer
Retrieve the resizer to use when dynamically allocating routees to the pool.
Declaration
public virtual Resizer Resizer { get; }
Property Value
| Type | Description |
|---|---|
| Resizer |
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 virtual SupervisorStrategy SupervisorStrategy { get; }
Property Value
| Type | Description |
|---|---|
| SupervisorStrategy |
UsePoolDispatcher
Retrieve whether or not to use the pool dispatcher. The dispatcher is defined in the 'pool-dispatcher' configuration property in the deployment section of the router.
Declaration
public virtual bool UsePoolDispatcher { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
| Edit this page View SourceCreateRouterActor()
TBD
Declaration
public override ActorBase CreateRouterActor()
Returns
| Type | Description |
|---|---|
| ActorBase | TBD |
Overrides
Equals(Pool)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(Pool other)
Parameters
| Type | Name | Description |
|---|---|---|
| Pool | other | An object to compare with this object. |
Returns
| Type | Description |
|---|---|
| bool | true if the current object is equal to the |
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with the current object. |
Returns
| Type | Description |
|---|---|
| bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
| Edit this page View SourceGetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A hash code for the current object. |
Overrides
| Edit this page View SourceGetNrOfInstances(ActorSystem)
Used by the Akka.Routing.RoutedActorCell to determine the initial number of routees.
Declaration
public abstract int GetNrOfInstances(ActorSystem system)
Parameters
| Type | Name | Description |
|---|---|---|
| ActorSystem | system | The actor system that owns this router. |
Returns
| Type | Description |
|---|---|
| int | The number of routees associated with this pool. |
Props(Props)
Adds the current router to the provided routeeProps.
Declaration
public Props Props(Props routeeProps)
Parameters
| Type | Name | Description |
|---|---|---|
| Props | routeeProps | The Props to configure with the current router. |
Returns
| Type | Description |
|---|---|
| Props | The provided |
Edit this page