public interface QueryLimiter
responseSupplier.| Modifier and Type | Interface and Description |
|---|---|
static class |
QueryLimiter.QueryResponse |
static class |
QueryLimiter.QueryStatistics |
| Modifier and Type | Method and Description |
|---|---|
long |
getConcurrentSearchLimit() |
long |
getConcurrentSearchNum() |
QueryLimiter.QueryResponse |
getResponseWithLimit(java.util.function.Supplier<javax.ws.rs.core.Response> responseSupplier,
javax.ws.rs.core.Response quotaExceededResponse)
Allows limiting concurrent number of queries.
|
QueryLimiter.QueryResponse getResponseWithLimit(java.util.function.Supplier<javax.ws.rs.core.Response> responseSupplier, javax.ws.rs.core.Response quotaExceededResponse)
responseSupplier - Supplier that will be executed if quota is not exceeded.quotaExceededResponse - If quota is exceeded it will be returned to the caller.QueryLimiter.QueryResponse with QueryLimiter.QueryStatistics and response consisting of: if quota is not exceeded then value returned by responseSupplier will be used, otherwise quotaExceededResponse will be used.long getConcurrentSearchNum()
long getConcurrentSearchLimit()
Copyright © 2002-2022 Atlassian. All Rights Reserved.