src/Orleans.Streaming/QueueBalancer/PersistentStreamConfiguratorExtension.cs
/// <summary>
/// Configures the stream provider to use the static cluster configuration deployment balancer.
/// </summary>
/// <param name="configurator">The configuration builder.</param>
/// <param name="siloMaturityPeriod">The silo maturity period.</param>
Configures the stream provider to use the static cluster configuration deployment balancer.
Configures the stream provider to use the static cluster configuration deployment balancer .
public static void UseStaticClusterConfigDeploymentBalancer(
            this ISiloPersistentStreamConfigurator configurator, 
            TimeSpan? siloMaturityPeriod = null)
        {
            configurator.ConfigurePartitionBalancing<DeploymentBasedQueueBalancerOptions>(
                (s, n) => DeploymentBasedQueueBalancer.Create(s, n, s.GetRequiredService<IOptions<StaticClusterDeploymentOptions>>().Value),
                options => options.Configure(op =>
                {
                    op.IsFixed = true;
                    if (siloMaturityPeriod.HasValue)
                        op.SiloMaturityPeriod = siloMaturityPeriod.Value;
                }));
        }
public static void UseStaticClusterConfigDeploymentBalancer ( this ISiloPersistentStreamConfigurator configurator , TimeSpan ? siloMaturityPeriod = null ) { configurator . ConfigurePartitionBalancing < DeploymentBasedQueueBalancerOptions > ( ( s , n ) => DeploymentBasedQueueBalancer . Create ( s , n , s . GetRequiredService < IOptions < StaticClusterDeploymentOptions > > ( ) . Value ) , options => options . Configure ( op => { op . IsFixed = true ; if ( siloMaturityPeriod . HasValue ) op . SiloMaturityPeriod = siloMaturityPeriod . Value ; } ) ) ; }
Configures the stream provider to use the static cluster configuration deployment balancer.
Configures the stream provider to use the static cluster configuration deployment balancer .
ISiloPersistentStreamConfigurator
this
siloMaturityPeriod
TimeSpan?
The silo maturity period.
The silo maturity period .
configurator
The configuration builder.
The configuration builder .