Class TimeSpacingThrottle
Throttle based on space reservation in time. It allows at most Limit calls of Try() function per Interval. The calls are assumed to be equally spaced within the Interval
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NFX.Throttling
Assembly: NFX.dll
Syntax
public class TimeSpacingThrottle : Throttle, IConfigurable, IThrottle, IApplicationComponent, IDisposable
Constructors
TimeSpacingThrottle()
Declaration
public TimeSpacingThrottle()
TimeSpacingThrottle(String, Int32, Int32, String)
Constructor
Declaration
public TimeSpacingThrottle(string name, int throttleLimit, int throttleInterval = 1, string unit = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of this instance |
System.Int32 | throttleLimit | Throttling limit per throttleInterval |
System.Int32 | throttleInterval | Throttling interval in number of seconds |
System.String | unit | Unit of measurement |
Properties
Interval
Return throttling interval in seconds
Declaration
[Config("$interval")]
public int Interval { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Limit
Return throttle limit over Interval
Declaration
[Config("$limit")]
public double Limit { get; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
Destructor()
Declaration
protected override void Destructor()
Overrides
DoConfigure(IConfigSectionNode)
Declaration
protected override void DoConfigure(IConfigSectionNode node)
Parameters
Type | Name | Description |
---|---|---|
IConfigSectionNode | node |
Overrides
Reset()
Reset the internal state of the throttling strategy
Declaration
public override void Reset()
Overrides
Implements
System.IDisposable