SlidingWindowConfig class
Sliding-window configuration that maintains a strict window boundary.
Requests are counted in aligned windows rather than in a rolling list of timestamps. The backend calculates the retry delay from the end of the current window.
- Inheritance
-
- Object
- RateLimitAlgorithmConfig
- SlidingWindowConfig
Constructors
- SlidingWindowConfig({required int limit, required Duration window})
- Creates a sliding-window configuration.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- limit → int
-
Maximum number of requests permitted within the window.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- strategy → RateLimitStrategy
-
Algorithm represented by this configuration.
finalinherited
- window → Duration
-
Window length.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited