Class RateLimitingThrottlingStrategy<T extends Request>


  • public final class RateLimitingThrottlingStrategy<T extends Request>
    extends ThrottlingStrategy<T>
    A ThrottlingStrategy that provides a throttling strategy based on QPS. The throttling works by examining the number of requests from the ThrottlingService from the beginning, and throttling if the QPS is found exceed the specified tolerable maximum.
    • Constructor Detail

      • RateLimitingThrottlingStrategy

        public RateLimitingThrottlingStrategy​(double requestPerSecond,
                                              @Nullable
                                              String name)
        Creates a new strategy with specified name.
        Parameters:
        requestPerSecond - the number of requests per one second this ThrottlingStrategy accepts.
      • RateLimitingThrottlingStrategy

        public RateLimitingThrottlingStrategy​(double requestPerSecond)
        Creates a new strategy.
        Parameters:
        requestPerSecond - the number of requests per one second this ThrottlingStrategy accepts.