Class FixedWindowRateLimitPolicyAttribute
Declare a Fixed-Window Rate-Limit policy.
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true, Inherited = true)]
public class FixedWindowRateLimitPolicyAttribute : RateLimitPolicyAttribute
- Inheritance
-
objectAttributeFixedWindowRateLimitPolicyAttribute
- Inherited Members
Remarks
You must use with [EnableRateLimit(..)] to enable the policy
Constructors
FixedWindowRateLimitPolicyAttribute(string, int, int, int)
Declare a Fixed-Window Rate-Limit policy
public FixedWindowRateLimitPolicyAttribute(string PolicyName, int Window, int PermitLimit, int QueueLimit)
Parameters
PolicyNamestringName of the policy.
WindowintSpecifies the time window (in seconds) that takes in the requests.
PermitLimitintMaximum number of permit counters that can be allowed in a window.
QueueLimitintMaximum cumulative permit count of queued acquisition requests
Properties
PermitLimit
Maximum number of permit counters that can be allowed in a window. Must be set to a value greater than 0
public int PermitLimit { get; set; }
Property Value
QueueLimit
Maximum cumulative permit count of queued acquisition requests. Must be set to a value greater than 0
public int QueueLimit { get; set; }
Property Value
Window
Specifies the time window (in seconds) that takes in the requests. Must be set to a value greater than 0
public int Window { get; set; }