Class SlidingWindowRateLimitPolicyAttribute
Declare a Fixed-Window Rate-Limit policy.
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true, Inherited = true)]
public class SlidingWindowRateLimitPolicyAttribute : RateLimitPolicyAttribute
- Inheritance
-
objectAttributeSlidingWindowRateLimitPolicyAttribute
- Inherited Members
Remarks
You must use with [EnableRateLimit(..)] to enable the policy
Constructors
SlidingWindowRateLimitPolicyAttribute(string, int, int, int, int)
public SlidingWindowRateLimitPolicyAttribute(string PolicyName, int Window, int SegmentsPerWindow, int PermitLimit, int QueueLimit)
Parameters
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
SegmentsPerWindow
Specifies the maximum number of segments a window is divided into. Must be set to a value greater than 0
public int SegmentsPerWindow { 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; }