Class NoopRequestLimiter<ContextT>
java.lang.Object
io.camunda.zeebe.broker.transport.backpressure.NoopRequestLimiter<ContextT>
- All Implemented Interfaces:
RequestLimiter<ContextT>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintgetLimit()voidonIgnore(int streamId, long requestId) Notify when a request is cancelled afterRequestLimiter.tryAcquire(int, long, Object)was success.voidonResponse(int streamId, long requestId) Notify when a request processing is completed by calling this method.booleantryAcquire(int streamId, long requestId, ContextT context) Try to add to the inflight requests.
-
Constructor Details
-
NoopRequestLimiter
public NoopRequestLimiter()
-
-
Method Details
-
tryAcquire
Description copied from interface:RequestLimiterTry to add to the inflight requests. If success,RequestLimiter.onResponse(int, long)()} must be called when the request * is processed.- Specified by:
tryAcquirein interfaceRequestLimiter<ContextT>context- some limiters may use additional context to decide if a request should be accepted- Returns:
- true if request is added to the inflight requests, false otherwise
-
onResponse
public void onResponse(int streamId, long requestId) Description copied from interface:RequestLimiterNotify when a request processing is completed by calling this method.- Specified by:
onResponsein interfaceRequestLimiter<ContextT>
-
onIgnore
public void onIgnore(int streamId, long requestId) Description copied from interface:RequestLimiterNotify when a request is cancelled afterRequestLimiter.tryAcquire(int, long, Object)was success.- Specified by:
onIgnorein interfaceRequestLimiter<ContextT>
-
getLimit
public int getLimit()- Specified by:
getLimitin interfaceRequestLimiter<ContextT>
-
getInflightCount
public int getInflightCount()- Specified by:
getInflightCountin interfaceRequestLimiter<ContextT>
-