NFX.Throttling NamespaceNFX Class Library

[This is preliminary documentation and is subject to change.]

Provides throttling functions like time-spacing rate limiters
Classes

  ClassDescription
Public classNOPThrottle
No operation throttle
Public classNOPThrottling
Represents throttling implementation that does nothing and always returns NOPThrottle
Public classSlidingWindowThrottle
Efficiently calculates the throttling rate over a number of seconds. The algorithm implements a variation of token bucket algorithm that doesn't require to add tokens to the bucket on a timer but rather it maintains a cirtular buffer of tokens with resolution of 1/BucketsPerSec. The Add() function is used to add items to a bucket associated with the timestamp passed as the first argument to the function. The Sum() returns the total number of items over the given interval of seconds. The items automatically expire when the time moves on the successive invocations of the Add() method.
Public classThrottle
Base class defining throttle interface
Public classThrottlingService
A service that maintains throttling components in an application and allows to turn on/off global throttling functionality
Public classTimeSpacingThrottle
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
Interfaces

  InterfaceDescription
Public interfaceIThrottle
Public interfaceIThrottling
Defines throttling interface to be implemented by the throttling service
Public interfaceIThrottlingImplementation
Interface implementing configurable and disposable throttling functionaliry