コード例 #1
0
ファイル: RoundRobin.cs プロジェクト: yfer/akka.net
 /// <summary>
 /// Initializes a new instance of the <see cref="RoundRobinPool"/> class.
 /// </summary>
 /// <param name="config">The configuration used to configure the pool.</param>
 public RoundRobinPool(Config config)
     : this(
         nrOfInstances : config.GetInt("nr-of-instances"),
         resizer : Resizer.FromConfig(config),
         supervisorStrategy : Pool.DefaultSupervisorStrategy,
         routerDispatcher : Dispatchers.DefaultDispatcherId,
         usePoolDispatcher : config.HasPath("pool-dispatcher"))
 {
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TailChoppingPool"/> class.
 /// <note>
 /// 'nr-of-instances', 'within', and 'tail-chopping-router.interval'
 /// must be defined in the provided configuration.
 /// </note>
 /// </summary>
 /// <param name="config">The configuration used to configure the pool.</param>
 public TailChoppingPool(Config config)
     : this(
         config.GetInt("nr-of-instances", 0),
         Resizer.FromConfig(config),
         Pool.DefaultSupervisorStrategy,
         Dispatchers.DefaultDispatcherId,
         config.GetTimeSpan("within", null), config.GetTimeSpan("tail-chopping-router.interval", null), config.HasPath("pool-dispatcher"))
 {
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ScatterGatherFirstCompletedPool"/> class.
 /// </summary>
 /// <param name="config">
 /// The configuration to use to lookup paths used by the group router.
 ///
 /// <note>
 /// 'within' must be defined in the provided configuration.
 /// </note>
 /// </param>
 public ScatterGatherFirstCompletedPool(Config config)
     : this(
         nrOfInstances : config.GetInt("nr-of-instances"),
         resizer : Resizer.FromConfig(config),
         within : config.GetTimeSpan("within"),
         supervisorStrategy : Pool.DefaultSupervisorStrategy,
         routerDispatcher : Dispatchers.DefaultDispatcherId,
         usePoolDispatcher : config.HasPath("pool-dispatcher"))
 {
 }
コード例 #4
0
 // TODO: do we need to check for null or empty config here?
 /// <summary>
 /// Initializes a new instance of the <see cref="ConsistentHashingPool"/> class.
 ///
 /// <note>
 /// 'virtual-nodes-factor' defaults to 0 (zero) if it is not defined in the provided configuration.
 /// </note>
 /// </summary>
 /// <param name="config">The configuration used to configure the pool.</param>
 public ConsistentHashingPool(Config config)
     : this(
         nrOfInstances : config.GetInt("nr-of-instances", 0),
         resizer : Resizer.FromConfig(config),
         supervisorStrategy : Pool.DefaultSupervisorStrategy,
         routerDispatcher : Dispatchers.DefaultDispatcherId,
         usePoolDispatcher : config.HasPath("pool-dispatcher"))
 {
     VirtualNodesFactor = config.GetInt("virtual-nodes-factor", 0);
 }