PartitionedRateLimiter<TResource> Class
Definition
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.
Represents a limiter type that users interact with to determine if an operation can proceed given a specific TResource
.
public abstract class PartitionedRateLimiter<TResource> : IAsyncDisposable, IDisposable
type PartitionedRateLimiter<'Resource> = class
interface IAsyncDisposable
interface IDisposable
Public MustInherit Class PartitionedRateLimiter(Of TResource)
Implements IAsyncDisposable, IDisposable
Type Parameters
- TResource
The resource type that is being limited.
- Inheritance
-
PartitionedRateLimiter<TResource>
- Implements
Constructors
PartitionedRateLimiter<TResource>() |
Methods
AcquireAsync(TResource, Int32, CancellationToken) |
Wait until the requested permits are available or permits can no longer be acquired. |
AcquireAsyncCore(TResource, Int32, CancellationToken) |
Method that PartitionedRateLimiter<TResource> implementations implement for AcquireAsync(TResource, Int32, CancellationToken). |
AttemptAcquire(TResource, Int32) |
Fast synchronous attempt to acquire permits. |
AttemptAcquireCore(TResource, Int32) |
Method that PartitionedRateLimiter<TResource> implementations implement for AttemptAcquire(TResource, Int32). |
Dispose() |
Disposes the RateLimiter. This completes any queued acquires with a failed lease. |
Dispose(Boolean) |
Dispose method for implementations to write. |
DisposeAsync() |
Disposes the RateLimiter asynchronously. |
DisposeAsyncCore() |
DisposeAsync method for implementations to write. |
GetStatistics(TResource) |
Gets a snapshot of the statistics for the |
WithTranslatedKey<TOuter>(Func<TOuter,TResource>, Boolean) |
Translates PartitionedRateLimiter<TOuter> into the current PartitionedRateLimiter<TResource>
using the |