FixedWindowRateLimiterOptions 类

定义

用于指定 . 的行为 FixedWindowRateLimiter的选项。

public ref class FixedWindowRateLimiterOptions sealed
public sealed class FixedWindowRateLimiterOptions
type FixedWindowRateLimiterOptions = class
Public NotInheritable Class FixedWindowRateLimiterOptions
继承
FixedWindowRateLimiterOptions

构造函数

名称 说明
FixedWindowRateLimiterOptions()

用于指定 . 的行为 FixedWindowRateLimiter的选项。

属性

名称 说明
AutoReplenishment

指定是 FixedWindowRateLimiter 自动刷新计数器,还是其他人将调用 TryReplenish() 刷新计数器。

PermitLimit

允许在窗口中允许的最大允许计数器数。 必须在这些选项传递到构造函数FixedWindowRateLimiter时将这些选项设置为值 > 0。

QueueLimit

排队获取请求的最大累积许可证计数。 必须在这些选项传递到构造函数FixedWindowRateLimiter时将这些选项设置为值 >= 0。

QueueProcessingOrder

确定何时没有足够的资源可以租用的行为 AcquireAsync(Int32, CancellationToken)

Window

指定请求中采用的时间范围。 必须设置为大于 Zero 这些选项传递给构造函数的值 FixedWindowRateLimiter

适用于