Class ConcurrencyLimitBuilder
java.lang.Object
com.linecorp.armeria.client.limit.ConcurrencyLimitBuilder
Builds a
ConcurrencyLimit
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns a newly-createdConcurrencyLimit
based on the properties of this builder.maxPendingAcquisitions
(int maxPendingAcquisitions) Sets the maximum number of pending acquisition.predicate
(Predicate<? super ClientRequestContext> predicate) Sets thePredicate
for which to apply the concurrency limit.Sets the amount of time until this decorator fails the request if the request was not delegated to thedelegate
before then.timeoutMillis
(long timeoutMillis) Sets the amount of time until this decorator fails the request if the request was not delegated to thedelegate
before then.
-
Method Details
-
timeoutMillis
Sets the amount of time until this decorator fails the request if the request was not delegated to thedelegate
before then. -
timeout
Sets the amount of time until this decorator fails the request if the request was not delegated to thedelegate
before then. -
maxPendingAcquisitions
Sets the maximum number of pending acquisition. TheCompletableFuture
returned byConcurrencyLimit.acquire(ClientRequestContext)
will be exceptionally complete with anTooManyPendingAcquisitionsException
if the pending exceeds this value. -
predicate
Sets thePredicate
for which to apply the concurrency limit. -
build
Returns a newly-createdConcurrencyLimit
based on the properties of this builder.
-