C# Класс Akka.Routing.ConsistentHashingPool

This class represents a Pool router that sends messages to a Routee determined using consistent-hashing. Please refer to ConsistentHashingRoutingLogic for more information on consistent hashing. Using Resizer with ConsistentHashingPool is potentially harmful, as hash ranges might change radically during live message processing. This router works best with fixed-sized pools or fixed number of routees per node in the event of clustered deployments.
Наследование: Akka.Routing.Pool
Показать файл Открыть проект

Открытые методы

Метод Описание
ConsistentHashingPool ( Config config ) : System

Initializes a new instance of the ConsistentHashingPool class. 'virtual-nodes-factor' defaults to 0 (zero) if it is not defined in the provided configuration.

ConsistentHashingPool ( int nrOfInstances ) : System

Initializes a new instance of the ConsistentHashingPool class. A ConsistentHashingPool configured in this way uses the Pool.DefaultStrategy supervisor strategy.

ConsistentHashingPool ( int nrOfInstances, Akka.Routing.Resizer resizer, Akka.Actor.SupervisorStrategy supervisorStrategy, string routerDispatcher, bool usePoolDispatcher = false, int virtualNodesFactor, ConsistentHashMapping hashMapping = null ) : System

Initializes a new instance of the ConsistentHashingPool class.

CreateRouter ( ActorSystem system ) : Router

Creates a router that is responsible for routing messages to routees within the provided system.

ToSurrogate ( ActorSystem system ) : ISurrogate

Creates a surrogate representation of the current ConsistentHashingPool.

WithDispatcher ( string dispatcher ) : Akka.Routing.Pool

Creates a new ConsistentHashingPool router with a given dispatcher id. This method is immutable and returns a new instance of the router.

WithFallback ( Akka.Routing.RouterConfig routerConfig ) : Akka.Routing.RouterConfig

Configure the current router with an auxiliary router for routes that it does not know how to handle.

WithHashMapping ( ConsistentHashMapping mapping ) : ConsistentHashingPool

Creates a new ConsistentHashingPool router with a given ConsistentHashMapping. This method is immutable and returns a new instance of the router.

WithResizer ( Akka.Routing.Resizer resizer ) : Akka.Routing.Pool

Creates a new ConsistentHashingPool router with a given Resizer. This method is immutable and returns a new instance of the router. Using Resizer with ConsistentHashingPool is potentially harmful, as hash ranges might change radically during live message processing. This router works best with fixed-sized pools or fixed number of routees per node in the event of clustered deployments.

WithSupervisorStrategy ( Akka.Actor.SupervisorStrategy strategy ) : Akka.Routing.Pool

Creates a new ConsistentHashingPool router with a given SupervisorStrategy. This method is immutable and returns a new instance of the router.

WithVirtualNodesFactor ( int vnodes ) : ConsistentHashingPool

Creates a new ConsistentHashingPool router with a given VirtualNodesFactor. This method is immutable and returns a new instance of the router.

Описание методов

ConsistentHashingPool() публичный Метод

Initializes a new instance of the ConsistentHashingPool class. 'virtual-nodes-factor' defaults to 0 (zero) if it is not defined in the provided configuration.
public ConsistentHashingPool ( Config config ) : System
config Akka.Configuration.Config The configuration used to configure the pool.
Результат System

ConsistentHashingPool() публичный Метод

Initializes a new instance of the ConsistentHashingPool class. A ConsistentHashingPool configured in this way uses the Pool.DefaultStrategy supervisor strategy.
public ConsistentHashingPool ( int nrOfInstances ) : System
nrOfInstances int The initial number of routees in the pool.
Результат System

ConsistentHashingPool() публичный Метод

Initializes a new instance of the ConsistentHashingPool class.
public ConsistentHashingPool ( int nrOfInstances, Akka.Routing.Resizer resizer, Akka.Actor.SupervisorStrategy supervisorStrategy, string routerDispatcher, bool usePoolDispatcher = false, int virtualNodesFactor, ConsistentHashMapping hashMapping = null ) : System
nrOfInstances int The initial number of routees in the pool.
resizer Akka.Routing.Resizer The resizer to use when dynamically allocating routees to the pool.
supervisorStrategy Akka.Actor.SupervisorStrategy The strategy to use when supervising the pool.
routerDispatcher string The dispatcher to use when passing messages to the routees.
usePoolDispatcher bool true to use the pool dispatcher; otherwise false.
virtualNodesFactor int The number of virtual nodes to use on the hash ring.
hashMapping ConsistentHashMapping The consistent hash mapping function to use on incoming messages.
Результат System

CreateRouter() публичный Метод

Creates a router that is responsible for routing messages to routees within the provided system.
public CreateRouter ( ActorSystem system ) : Router
system ActorSystem The actor system that owns this router.
Результат Router

ToSurrogate() публичный Метод

Creates a surrogate representation of the current ConsistentHashingPool.
public ToSurrogate ( ActorSystem system ) : ISurrogate
system ActorSystem The actor system that owns this router.
Результат ISurrogate

WithDispatcher() публичный Метод

Creates a new ConsistentHashingPool router with a given dispatcher id. This method is immutable and returns a new instance of the router.
public WithDispatcher ( string dispatcher ) : Akka.Routing.Pool
dispatcher string The dispatcher id used to configure the new router.
Результат Akka.Routing.Pool

WithFallback() публичный Метод

Configure the current router with an auxiliary router for routes that it does not know how to handle.
routerConfig
public WithFallback ( Akka.Routing.RouterConfig routerConfig ) : Akka.Routing.RouterConfig
routerConfig Akka.Routing.RouterConfig The router to use as an auxiliary source.
Результат Akka.Routing.RouterConfig

WithHashMapping() публичный Метод

Creates a new ConsistentHashingPool router with a given ConsistentHashMapping. This method is immutable and returns a new instance of the router.
public WithHashMapping ( ConsistentHashMapping mapping ) : ConsistentHashingPool
mapping ConsistentHashMapping The used to configure the new router.
Результат ConsistentHashingPool

WithResizer() публичный Метод

Creates a new ConsistentHashingPool router with a given Resizer. This method is immutable and returns a new instance of the router. Using Resizer with ConsistentHashingPool is potentially harmful, as hash ranges might change radically during live message processing. This router works best with fixed-sized pools or fixed number of routees per node in the event of clustered deployments.
public WithResizer ( Akka.Routing.Resizer resizer ) : Akka.Routing.Pool
resizer Akka.Routing.Resizer The used to configure the new router.
Результат Akka.Routing.Pool

WithSupervisorStrategy() публичный Метод

Creates a new ConsistentHashingPool router with a given SupervisorStrategy. This method is immutable and returns a new instance of the router.
public WithSupervisorStrategy ( Akka.Actor.SupervisorStrategy strategy ) : Akka.Routing.Pool
strategy Akka.Actor.SupervisorStrategy The used to configure the new router.
Результат Akka.Routing.Pool

WithVirtualNodesFactor() публичный Метод

Creates a new ConsistentHashingPool router with a given VirtualNodesFactor. This method is immutable and returns a new instance of the router.
public WithVirtualNodesFactor ( int vnodes ) : ConsistentHashingPool
vnodes int The used to configure the new router.
Результат ConsistentHashingPool