Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

TokenBucketRateLimiterOptions Class

Definition

Namespace:
System.Threading.RateLimiting
Assembly:
System.Threading.RateLimiting.dll
Package:
System.Threading.RateLimiting v11.0.0-preview.5.26302.115
Source:
TokenBucketRateLimiterOptions.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Options to control the behavior of a TokenBucketRateLimiter.

public ref class TokenBucketRateLimiterOptions sealed
public sealed class TokenBucketRateLimiterOptions
type TokenBucketRateLimiterOptions = class
Public NotInheritable Class TokenBucketRateLimiterOptions
Inheritance
TokenBucketRateLimiterOptions

Constructors

Name Description
TokenBucketRateLimiterOptions()

Properties

Name Description
AutoReplenishment

Specified whether the TokenBucketRateLimiter is automatically replenishing tokens or if someone else will be calling TryReplenish() to replenish tokens.

QueueLimit

Maximum cumulative token count of queued acquisition requests. Must be set to a value >= 0 by the time these options are passed to the constructor of TokenBucketRateLimiter.

QueueProcessingOrder

Determines the behaviour of AcquireAsync(Int32, CancellationToken) when not enough resources can be leased.

ReplenishmentPeriod

Specifies the minimum period between replenishments. Must be set to a value greater than Zero by the time these options are passed to the constructor of TokenBucketRateLimiter.

TokenLimit

Maximum number of tokens that can be in the bucket at any time. Must be set to a value > 0 by the time these options are passed to the constructor of TokenBucketRateLimiter.

TokensPerPeriod

Specifies the maximum number of tokens to restore each replenishment. Must be set to a value > 0 by the time these options are passed to the constructor of TokenBucketRateLimiter.

Applies to


Feedback

Was this page helpful?