Property RateLimiterCreator
RateLimiterCreator
For Cloud Service or Cloud Simulator only.
Gets or sets a delegate used to create custom rate limiter
instances.
Declaration
public Func<IRateLimiter> RateLimiterCreator { get; set; }
Property Value
Type | Description |
---|---|
Func<IRateLimiter> | The delegate that takes no arguments and returns an instance of IRateLimiter. If not set, the driver will use instances of NoSQLRateLimiter. If rate limiting is disabled, this property has no effect. |
Remarks
Setting this property allows you to specify custom rate limiting algorithm instead of driver-default (see NoSQLRateLimiter). Typically you would do this by having a class implementing IRateLimiter interface, in which case this property will be set to a factory delegate that creates new instances of this class. The driver will use this delegate to create two instances of IRateLimiter per table (one for reads and another one for writes).
Note that this delegate does not set initial limit (rate) of a rate limiter instance. Instead, SetLimit(Double) is used to set the initial limit.