public class ClientRequestLimitInterceptor extends Object implements io.grpc.ClientInterceptor
Refer to `concurrency-limit-grpc`
| Constructor and Description |
|---|
ClientRequestLimitInterceptor(com.netflix.concurrency.limits.Limiter<RequestLimitCtx> limiter) |
ClientRequestLimitInterceptor(com.netflix.concurrency.limits.Limiter<RequestLimitCtx> limiter,
java.util.function.Function<String,Boolean> filter) |
| Modifier and Type | Method and Description |
|---|---|
<ReqT,RespT> |
interceptCall(io.grpc.MethodDescriptor<ReqT,RespT> method,
io.grpc.CallOptions callOpts,
io.grpc.Channel next) |
static boolean |
isLimitSwitchOpen()
Whether limit open.
|
static boolean |
resetLimitSwitch()
See
isLimitSwitchOpen()
Reset `limitSwitch`, set to the opposite of the old value. |
public ClientRequestLimitInterceptor(com.netflix.concurrency.limits.Limiter<RequestLimitCtx> limiter)
public ClientRequestLimitInterceptor(com.netflix.concurrency.limits.Limiter<RequestLimitCtx> limiter, java.util.function.Function<String,Boolean> filter)
public <ReqT,RespT> io.grpc.ClientCall<ReqT,RespT> interceptCall(io.grpc.MethodDescriptor<ReqT,RespT> method,
io.grpc.CallOptions callOpts,
io.grpc.Channel next)
interceptCall in interface io.grpc.ClientInterceptorpublic static boolean isLimitSwitchOpen()
public static boolean resetLimitSwitch()
isLimitSwitchOpen()
Reset `limitSwitch`, set to the opposite of the old value.Copyright © 2023. All rights reserved.