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
| Improve this Doc View SourcePool(Int32, Resizer, SupervisorStrategy, String, Boolean)
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 |
---|---|---|
Int32 | 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. |
Boolean | usePoolDispatcher |
|
Properties
| Improve this Doc 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 |
---|---|
Int32 |
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 |
---|---|
Boolean |
Overrides
| Improve this Doc 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 |
---|---|
Boolean |
Methods
| Improve this Doc View SourceCreateRouterActor()
TBD
Declaration
public override ActorBase CreateRouterActor()
Returns
Type | Description |
---|---|
ActorBase | TBD |
Overrides
Equals(Pool)
Declaration
public bool Equals(Pool other)
Parameters
Type | Name | Description |
---|---|---|
Pool | 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 SourceGetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
| Improve this Doc 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 |
---|---|
Int32 | 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 |