次の方法で共有


FixedWindowRateLimiter クラス

定義

RateLimiter 許可された許可をウィンドウで定期的に更新する実装。

public sealed class FixedWindowRateLimiter : System.Threading.RateLimiting.ReplenishingRateLimiter
type FixedWindowRateLimiter = class
    inherit ReplenishingRateLimiter
Public NotInheritable Class FixedWindowRateLimiter
Inherits ReplenishingRateLimiter
継承
FixedWindowRateLimiter

コンストラクター

FixedWindowRateLimiter(FixedWindowRateLimiterOptions)

FixedWindowRateLimiter を初期化します。

プロパティ

IdleDuration

がすべての許可を RateLimiter 利用できる期間を指定します。 未使用の RateLimiters をクリーンしたい場合がある RateLimiter マネージャーによって使用されます。

IsAutoReplenishing

が自動的にトークンを補充するか ReplenishingRateLimiter 、外部ソースが を定期的に呼び出 TryReplenish()す必要があるかどうかを指定します。

ReplenishmentPeriod

がトークンを補充する ReplenishingRateLimiter 頻度を指定します。 が のfalse場合IsAutoReplenishing、これは呼び出す頻度TryReplenish()です。

メソッド

AcquireAsync(Int32, CancellationToken)

要求された許可が利用可能か、許可が取得できなくなるまで待ちます。

(継承元 RateLimiter)
AcquireAsyncCore(Int32, CancellationToken)

の実装で RateLimiter 実装 AcquireAsync(Int32, CancellationToken)されるメソッド。

(継承元 RateLimiter)
AttemptAcquire(Int32)

許可を取得するための高速同期試行。

(継承元 RateLimiter)
AttemptAcquireCore(Int32)

の実装で RateLimiter 実装 AttemptAcquire(Int32)されるメソッド。

(継承元 RateLimiter)
Dispose()

RateLimiter を破棄します。 これにより、失敗したリースを使用してキューに登録された取得が完了します。

(継承元 RateLimiter)
Dispose(Boolean)

書き込む実装の Dispose メソッド。

(継承元 RateLimiter)
DisposeAsync()

RateLimiter を非同期的に破棄します。

(継承元 RateLimiter)
DisposeAsyncCore()

書き込む実装の DisposeAsync メソッド。

(継承元 RateLimiter)
GetStatistics()

統計情報のスナップショットを取得します RateLimiter (使用可能な場合)。

TryReplenish()

ウィンドウで要求カウンターの補充を試みます。

適用対象