Class RateLimitingThrottlingStrategy<T extends Request>
java.lang.Object
com.linecorp.armeria.server.throttling.ThrottlingStrategy<T>
com.linecorp.armeria.server.throttling.RateLimitingThrottlingStrategy<T>
@Deprecated public final class RateLimitingThrottlingStrategy<T extends Request> extends ThrottlingStrategy<T>
Deprecated.
A
ThrottlingStrategy
that provides a throttling strategy based on QPS.
The throttling works by examining the number of requests from the beginning, and
throttling if the QPS is found exceed the specified tolerable maximum.-
Constructor Summary
Constructors Constructor Description RateLimitingThrottlingStrategy(double requestPerSecond)
Deprecated.RateLimitingThrottlingStrategy(double requestPerSecond, String name)
Deprecated. -
Method Summary
Modifier and Type Method Description CompletionStage<Boolean>
accept(ServiceRequestContext ctx, T request)
Deprecated.Returns whether a given request should be treated as failed before it is handled actually.Methods inherited from class com.linecorp.armeria.server.throttling.ThrottlingStrategy
always, name, never, of, of, rateLimiting, rateLimiting
-
Constructor Details
-
RateLimitingThrottlingStrategy
Deprecated.Creates a new strategy with specified name.- Parameters:
requestPerSecond
- the number of requests per one second thisThrottlingStrategy
accepts.
-
RateLimitingThrottlingStrategy
Deprecated.Creates a new strategy.- Parameters:
requestPerSecond
- the number of requests per one second thisThrottlingStrategy
accepts.
-
-
Method Details
-
accept
Deprecated.Description copied from class:ThrottlingStrategy
Returns whether a given request should be treated as failed before it is handled actually.- Specified by:
accept
in classThrottlingStrategy<T extends Request>
-