RingDotNetfor Ring

System.Threading.RateLimiting

18 wrapped types. Load them with using { "System.Threading.RateLimiting" }. Click a class to open it.

ConcurrencyLimiter class sealed · extends RateLimiter

System.Threading.RateLimiting.ConcurrencyLimiter · assembly System.Threading.RateLimiting

Implements: IAsyncDisposable, IDisposable

Constructors

new ConcurrencyLimiter(ConcurrencyLimiterOptions options)

Ring: new ConcurrencyLimiter(args) uses one constructor; the others are chosen by the parameter names: new ConcurrencyLimiter().@New([ :param = value ]) or dnNew("ConcurrencyLimiter",[ :param = value ]).

Properties and fields

NameTypeAccessIn Ring
IdleDurationTimeSpan?reado.getIdleDuration()

Methods

MethodRing call.NET overloads
GetStatisticscallMethod("GetStatistics",[])RateLimiterStatistics GetStatistics()

Members of the base class are inherited.

ConcurrencyLimiterOptions class sealed

System.Threading.RateLimiting.ConcurrencyLimiterOptions · assembly System.Threading.RateLimiting

Constructors

new ConcurrencyLimiterOptions()

Ring: new ConcurrencyLimiterOptions(args) uses one constructor; the others are chosen by the parameter names: new ConcurrencyLimiterOptions().@New([ :param = value ]) or dnNew("ConcurrencyLimiterOptions",[ :param = value ]).

Properties and fields

NameTypeAccessIn Ring
PermitLimitintread, writeo.PermitLimit o.PermitLimit = v
QueueProcessingOrderQueueProcessingOrderread, writeo.QueueProcessingOrder o.QueueProcessingOrder = v
QueueLimitintread, writeo.QueueLimit o.QueueLimit = v
FixedWindowRateLimiter class sealed · extends ReplenishingRateLimiter

System.Threading.RateLimiting.FixedWindowRateLimiter · assembly System.Threading.RateLimiting

Implements: IAsyncDisposable, IDisposable

Constructors

new FixedWindowRateLimiter(FixedWindowRateLimiterOptions options)

Ring: new FixedWindowRateLimiter(args) uses one constructor; the others are chosen by the parameter names: new FixedWindowRateLimiter().@New([ :param = value ]) or dnNew("FixedWindowRateLimiter",[ :param = value ]).

Properties and fields

NameTypeAccessIn Ring
IdleDurationTimeSpan?reado.getIdleDuration()
IsAutoReplenishingboolreado.getIsAutoReplenishing()
ReplenishmentPeriodTimeSpanreado.getReplenishmentPeriod()

Methods

MethodRing call.NET overloads
GetStatisticscallMethod("GetStatistics",[])RateLimiterStatistics GetStatistics()
TryReplenishcallMethod("TryReplenish",[])bool TryReplenish()

Members of the base class are inherited.

FixedWindowRateLimiterOptions class sealed

System.Threading.RateLimiting.FixedWindowRateLimiterOptions · assembly System.Threading.RateLimiting

Constructors

new FixedWindowRateLimiterOptions()

Ring: new FixedWindowRateLimiterOptions(args) uses one constructor; the others are chosen by the parameter names: new FixedWindowRateLimiterOptions().@New([ :param = value ]) or dnNew("FixedWindowRateLimiterOptions",[ :param = value ]).

Properties and fields

NameTypeAccessIn Ring
WindowTimeSpanread, writeo.Window o.Window = v
AutoReplenishmentboolread, writeo.AutoReplenishment o.AutoReplenishment = v
PermitLimitintread, writeo.PermitLimit o.PermitLimit = v
QueueProcessingOrderQueueProcessingOrderread, writeo.QueueProcessingOrder o.QueueProcessingOrder = v
QueueLimitintread, writeo.QueueLimit o.QueueLimit = v
MetadataName class static

System.Threading.RateLimiting.MetadataName · assembly System.Threading.RateLimiting

Properties and fields

NameTypeAccessIn Ring
RetryAfterMetadataName<TimeSpan>read · statico.RetryAfter
ReasonPhraseMetadataName<string>read · statico.ReasonPhrase

Methods

MethodRing call.NET overloads
CreateCreate(value)
Create([ :name = … ])
static MetadataName<T> Create<T>(string name)
MetadataName1 class sealed

System.Threading.RateLimiting.MetadataName`1 · assembly System.Threading.RateLimiting

Properties and fields

NameTypeAccessIn Ring
Namestringreado.Name
PartitionedRateLimiter class static

System.Threading.RateLimiting.PartitionedRateLimiter · assembly System.Threading.RateLimiting

Methods

MethodRing call.NET overloads
CreateCreate([ :partitioner = …, :equalityComparer = … ])static PartitionedRateLimiter<TResource> Create<TResource, TPartitionKey>(Func<TResource, RateLimitPartition<TPartitionKey>> partitioner, IEqualityComparer<TPartitionKey> equalityComparer = …)
CreateChainedCreateChained(p1)static PartitionedRateLimiter<TResource> CreateChained<TResource>(PartitionedRateLimiter<TResource>[] limiters)
PartitionedRateLimiter1 class abstract

System.Threading.RateLimiting.PartitionedRateLimiter`1 · assembly System.Threading.RateLimiting

Implements: IAsyncDisposable, IDisposable

Methods

MethodRing call.NET overloads
WithTranslatedKeycallMethod("WithTranslatedKey",[p1,p2])PartitionedRateLimiter<TOuter> WithTranslatedKey<TOuter>(Func<TOuter, TResource> keyAdapter, bool leaveOpen)
RateLimiter class abstract

System.Threading.RateLimiting.RateLimiter · assembly System.Threading.RateLimiting

Implements: IAsyncDisposable, IDisposable

Properties and fields

NameTypeAccessIn Ring
IdleDurationTimeSpan?reado.IdleDuration

Methods

MethodRing call.NET overloads
AcquireAsyncAcquireAsync([ :permitCount = …, :cancellationToken = … ])ValueTask<RateLimitLease> AcquireAsync(int permitCount = …, CancellationToken cancellationToken = …)
AttemptAcquireAttemptAcquire(value)
AttemptAcquire([ :permitCount = … ])
RateLimitLease AttemptAcquire(int permitCount = …)
DisposecallMethod("Dispose",[])void Dispose()
DisposeAsynccallMethod("DisposeAsync",[])ValueTask DisposeAsync()
GetStatisticscallMethod("GetStatistics",[])RateLimiterStatistics GetStatistics()
RateLimiterStatistics class

System.Threading.RateLimiting.RateLimiterStatistics · assembly System.Threading.RateLimiting

Constructors

new RateLimiterStatistics()

Ring: new RateLimiterStatistics(args) uses one constructor; the others are chosen by the parameter names: new RateLimiterStatistics().@New([ :param = value ]) or dnNew("RateLimiterStatistics",[ :param = value ]).

Properties and fields

NameTypeAccessIn Ring
CurrentAvailablePermitslongread, writeo.CurrentAvailablePermits o.CurrentAvailablePermits = v
CurrentQueuedCountlongread, writeo.CurrentQueuedCount o.CurrentQueuedCount = v
TotalFailedLeaseslongread, writeo.TotalFailedLeases o.TotalFailedLeases = v
TotalSuccessfulLeaseslongread, writeo.TotalSuccessfulLeases o.TotalSuccessfulLeases = v
RateLimitLease class abstract

System.Threading.RateLimiting.RateLimitLease · assembly System.Threading.RateLimiting

Implements: IDisposable

Properties and fields

NameTypeAccessIn Ring
IsAcquiredboolreado.IsAcquired
MetadataNamesIEnumerable<string>reado.MetadataNames

Methods

MethodRing call.NET overloads
DisposecallMethod("Dispose",[])void Dispose()
GetAllMetadatacallMethod("GetAllMetadata",[])IEnumerable<KeyValuePair<string, object>> GetAllMetadata()
TryGetMetadataTryGetMetadata(p1)bool TryGetMetadata(string metadataName, out object metadata)
bool TryGetMetadata<T>(MetadataName<T> metadataName, out T metadata)
RateLimitPartition class static

System.Threading.RateLimiting.RateLimitPartition · assembly System.Threading.RateLimiting

Methods

MethodRing call.NET overloads
Get@Get(p1,p2)static RateLimitPartition<TKey> Get<TKey>(TKey partitionKey, Func<TKey, RateLimiter> factory)
GetConcurrencyLimiterGetConcurrencyLimiter(p1,p2)static RateLimitPartition<TKey> GetConcurrencyLimiter<TKey>(TKey partitionKey, Func<TKey, ConcurrencyLimiterOptions> factory)
GetFixedWindowLimiterGetFixedWindowLimiter(p1,p2)static RateLimitPartition<TKey> GetFixedWindowLimiter<TKey>(TKey partitionKey, Func<TKey, FixedWindowRateLimiterOptions> factory)
GetNoLimiterGetNoLimiter(p1)static RateLimitPartition<TKey> GetNoLimiter<TKey>(TKey partitionKey)
GetSlidingWindowLimiterGetSlidingWindowLimiter(p1,p2)static RateLimitPartition<TKey> GetSlidingWindowLimiter<TKey>(TKey partitionKey, Func<TKey, SlidingWindowRateLimiterOptions> factory)
GetTokenBucketLimiterGetTokenBucketLimiter(p1,p2)static RateLimitPartition<TKey> GetTokenBucketLimiter<TKey>(TKey partitionKey, Func<TKey, TokenBucketRateLimiterOptions> factory)
RateLimitPartition1 struct

System.Threading.RateLimiting.RateLimitPartition`1 · assembly System.Threading.RateLimiting

Properties and fields

NameTypeAccessIn Ring
PartitionKeyTKeyreado.PartitionKey
FactoryFunc<TKey, RateLimiter>reado.Factory
ReplenishingRateLimiter class abstract · extends RateLimiter

System.Threading.RateLimiting.ReplenishingRateLimiter · assembly System.Threading.RateLimiting

Implements: IAsyncDisposable, IDisposable

Properties and fields

NameTypeAccessIn Ring
ReplenishmentPeriodTimeSpanreado.ReplenishmentPeriod
IsAutoReplenishingboolreado.IsAutoReplenishing

Methods

MethodRing call.NET overloads
TryReplenishcallMethod("TryReplenish",[])bool TryReplenish()

Members of the base class are inherited.

SlidingWindowRateLimiter class sealed · extends ReplenishingRateLimiter

System.Threading.RateLimiting.SlidingWindowRateLimiter · assembly System.Threading.RateLimiting

Implements: IAsyncDisposable, IDisposable

Constructors

new SlidingWindowRateLimiter(SlidingWindowRateLimiterOptions options)

Ring: new SlidingWindowRateLimiter(args) uses one constructor; the others are chosen by the parameter names: new SlidingWindowRateLimiter().@New([ :param = value ]) or dnNew("SlidingWindowRateLimiter",[ :param = value ]).

Properties and fields

NameTypeAccessIn Ring
IdleDurationTimeSpan?reado.getIdleDuration()
IsAutoReplenishingboolreado.getIsAutoReplenishing()
ReplenishmentPeriodTimeSpanreado.getReplenishmentPeriod()

Methods

MethodRing call.NET overloads
GetStatisticscallMethod("GetStatistics",[])RateLimiterStatistics GetStatistics()
TryReplenishcallMethod("TryReplenish",[])bool TryReplenish()

Members of the base class are inherited.

SlidingWindowRateLimiterOptions class sealed

System.Threading.RateLimiting.SlidingWindowRateLimiterOptions · assembly System.Threading.RateLimiting

Constructors

new SlidingWindowRateLimiterOptions()

Ring: new SlidingWindowRateLimiterOptions(args) uses one constructor; the others are chosen by the parameter names: new SlidingWindowRateLimiterOptions().@New([ :param = value ]) or dnNew("SlidingWindowRateLimiterOptions",[ :param = value ]).

Properties and fields

NameTypeAccessIn Ring
WindowTimeSpanread, writeo.Window o.Window = v
SegmentsPerWindowintread, writeo.SegmentsPerWindow o.SegmentsPerWindow = v
AutoReplenishmentboolread, writeo.AutoReplenishment o.AutoReplenishment = v
PermitLimitintread, writeo.PermitLimit o.PermitLimit = v
QueueProcessingOrderQueueProcessingOrderread, writeo.QueueProcessingOrder o.QueueProcessingOrder = v
QueueLimitintread, writeo.QueueLimit o.QueueLimit = v
TokenBucketRateLimiter class sealed · extends ReplenishingRateLimiter

System.Threading.RateLimiting.TokenBucketRateLimiter · assembly System.Threading.RateLimiting

Implements: IAsyncDisposable, IDisposable

Constructors

new TokenBucketRateLimiter(TokenBucketRateLimiterOptions options)

Ring: new TokenBucketRateLimiter(args) uses one constructor; the others are chosen by the parameter names: new TokenBucketRateLimiter().@New([ :param = value ]) or dnNew("TokenBucketRateLimiter",[ :param = value ]).

Properties and fields

NameTypeAccessIn Ring
IdleDurationTimeSpan?reado.getIdleDuration()
IsAutoReplenishingboolreado.getIsAutoReplenishing()
ReplenishmentPeriodTimeSpanreado.getReplenishmentPeriod()

Methods

MethodRing call.NET overloads
GetStatisticscallMethod("GetStatistics",[])RateLimiterStatistics GetStatistics()
TryReplenishcallMethod("TryReplenish",[])bool TryReplenish()

Members of the base class are inherited.

TokenBucketRateLimiterOptions class sealed

System.Threading.RateLimiting.TokenBucketRateLimiterOptions · assembly System.Threading.RateLimiting

Constructors

new TokenBucketRateLimiterOptions()

Ring: new TokenBucketRateLimiterOptions(args) uses one constructor; the others are chosen by the parameter names: new TokenBucketRateLimiterOptions().@New([ :param = value ]) or dnNew("TokenBucketRateLimiterOptions",[ :param = value ]).

Properties and fields

NameTypeAccessIn Ring
ReplenishmentPeriodTimeSpanread, writeo.ReplenishmentPeriod o.ReplenishmentPeriod = v
TokensPerPeriodintread, writeo.TokensPerPeriod o.TokensPerPeriod = v
AutoReplenishmentboolread, writeo.AutoReplenishment o.AutoReplenishment = v
TokenLimitintread, writeo.TokenLimit o.TokenLimit = v
QueueProcessingOrderQueueProcessingOrderread, writeo.QueueProcessingOrder o.QueueProcessingOrder = v
QueueLimitintread, writeo.QueueLimit o.QueueLimit = v