Lean
$LEAN_TAG$
|
Provides parameters that control the behavior of a leaky bucket rate limiting algorithm. The parameter names below are phrased in the positive, such that the bucket is filled up over time vs leaking out over time. More...
Public Member Functions | |
LeakyBucketControlParameters () | |
Initializes a new instance of the LeakyBucketControlParameters using default values More... | |
LeakyBucketControlParameters (int capacity, int refillAmount, int timeIntervalMinutes) | |
Initializes a new instance of the LeakyBucketControlParameters with the specified value More... | |
Properties | |
static int | DefaultCapacity = Config.GetInt("scheduled-event-leaky-bucket-capacity", 2 * 60) [get, set] |
Default capacity for leaky bucket More... | |
static int | DefaultTimeInterval = Config.GetInt("scheduled-event-leaky-bucket-time-interval-minutes", 1440) [get, set] |
Default time interval More... | |
static int | DefaultRefillAmount = Config.GetInt("scheduled-event-leaky-bucket-refill-amount", (int)Math.Ceiling(DefaultCapacity/7.0)) [get, set] |
Default refill amount More... | |
int | Capacity [get, set] |
Sets the total capacity of the bucket in a leaky bucket algorithm. This is the maximum number of 'units' the bucket can hold and also defines the maximum burst rate, assuming instantaneous usage of 'units'. In reality, the usage of 'units' takes times, and so it is possible for the bucket to incrementally refill while consuming from the bucket. More... | |
int | RefillAmount [get, set] |
Sets the refill amount of the bucket. This defines the quantity of 'units' that become available to a consuming entity after the time interval has elapsed. For example, if the refill amount is equal to one, then each time interval one new 'unit' will be made available for a consumer that is throttled by the leaky bucket. More... | |
int | TimeIntervalMinutes [get, set] |
Sets the time interval for the refill amount of the bucket, in minutes. After this amount of wall-clock time has passed, the bucket will refill the refill amount, thereby making more 'units' available for a consumer. For example, if the refill amount equals 10 and the time interval is 30 minutes, then every 30 minutes, 10 more 'units' become available for a consumer. The available 'units' will continue to increase until the bucket capacity is reached. More... | |
Provides parameters that control the behavior of a leaky bucket rate limiting algorithm. The parameter names below are phrased in the positive, such that the bucket is filled up over time vs leaking out over time.
Definition at line 28 of file LeakyBucketControlParameters.cs.
QuantConnect.Packets.LeakyBucketControlParameters.LeakyBucketControlParameters | ( | ) |
Initializes a new instance of the LeakyBucketControlParameters using default values
Definition at line 77 of file LeakyBucketControlParameters.cs.
QuantConnect.Packets.LeakyBucketControlParameters.LeakyBucketControlParameters | ( | int | capacity, |
int | refillAmount, | ||
int | timeIntervalMinutes | ||
) |
Initializes a new instance of the LeakyBucketControlParameters with the specified value
capacity | The total capacity of the bucket in minutes |
refillAmount | The number of additional minutes to add to the bucket after timeIntervalMinutes has elapsed |
timeIntervalMinutes | The interval, in minutes, that must pass before the refillAmount is added back to the bucket for reuse |
Definition at line 92 of file LeakyBucketControlParameters.cs.
|
staticgetset |
Default capacity for leaky bucket
Definition at line 37 of file LeakyBucketControlParameters.cs.
|
staticgetset |
Default time interval
Definition at line 42 of file LeakyBucketControlParameters.cs.
|
staticgetset |
Default refill amount
Definition at line 47 of file LeakyBucketControlParameters.cs.
|
getset |
Sets the total capacity of the bucket in a leaky bucket algorithm. This is the maximum number of 'units' the bucket can hold and also defines the maximum burst rate, assuming instantaneous usage of 'units'. In reality, the usage of 'units' takes times, and so it is possible for the bucket to incrementally refill while consuming from the bucket.
Definition at line 55 of file LeakyBucketControlParameters.cs.
|
getset |
Sets the refill amount of the bucket. This defines the quantity of 'units' that become available to a consuming entity after the time interval has elapsed. For example, if the refill amount is equal to one, then each time interval one new 'unit' will be made available for a consumer that is throttled by the leaky bucket.
Definition at line 63 of file LeakyBucketControlParameters.cs.
|
getset |
Sets the time interval for the refill amount of the bucket, in minutes. After this amount of wall-clock time has passed, the bucket will refill the refill amount, thereby making more 'units' available for a consumer. For example, if the refill amount equals 10 and the time interval is 30 minutes, then every 30 minutes, 10 more 'units' become available for a consumer. The available 'units' will continue to increase until the bucket capacity is reached.
Definition at line 72 of file LeakyBucketControlParameters.cs.