Skip to content

LoadShedQueueFlowController Methods

Flow control triggered by silo load shedding. This is an all-or-nothing trigger which will request System.Int32.MaxValue, or 0.

CreateAsPercentOfLoadSheddingLimit(LoadSheddingOptions, IEnvironmentStatisticsProvider, int)

static
View source
public static IQueueFlowController CreateAsPercentOfLoadSheddingLimit(LoadSheddingOptions options, IEnvironmentStatisticsProvider environmentStatisticsProvider, int percentOfSiloSheddingLimit = 95)
Creates a flow controller triggered when the CPU reaches a percentage of the cluster load shedding limit. This is intended to reduce queue read rate prior to causing the silo to shed load. Note: Triggered only when load shedding is enabled.

Parameters

optionsLoadSheddingOptions
The silo statistics options.
environmentStatisticsProviderIEnvironmentStatisticsProvider
The silo environment statistics.
percentOfSiloSheddingLimitint
Percentage of load shed limit which triggers a reduction of queue read rate.

Returns

The flow controller.

CreateAsPercentageOfCPU(int, LoadSheddingOptions, IEnvironmentStatisticsProvider)

static
View source
public static IQueueFlowController CreateAsPercentageOfCPU(int loadSheddingLimit, LoadSheddingOptions options, IEnvironmentStatisticsProvider environmentStatisticsProvider)
Creates a flow controller triggered when the CPU reaches the specified limit. Note: Triggered only when load shedding is enabled.

Parameters

loadSheddingLimitint
Percentage of CPU which triggers queue read rate reduction
optionsLoadSheddingOptions
The silo statistics options.
environmentStatisticsProviderIEnvironmentStatisticsProvider
The silo environment statistics.

Returns

The flow controller.

GetMaxAddCount

View source
public int GetMaxAddCount()
Gets the maximum number of items that can be added.

Returns

The maximum number of items that can be added.