Package io.servicetalk.client.api
Interface ReservableRequestConcurrencyController
- All Superinterfaces:
RequestConcurrencyController
- All Known Subinterfaces:
FilterableStreamingHttpLoadBalancedConnection
,LoadBalancedConnection
- All Known Implementing Classes:
DelegatingFilterableStreamingHttpLoadBalancedConnection
,HttpLoadBalancerFactory.DefaultFilterableStreamingHttpLoadBalancedConnection
A
RequestConcurrencyController
that also allows to tryReserve()
a connection for exclusive use.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.servicetalk.client.api.RequestConcurrencyController
RequestConcurrencyController.Result
-
Method Summary
Modifier and TypeMethodDescriptionMust be called (and subscribed to) to signify the reservation has completed aftertryReserve()
.boolean
Attempts to reserve a connection for exclusive use untilreleaseAsync()
is called.Methods inherited from interface io.servicetalk.client.api.RequestConcurrencyController
requestFinished, tryRequest
-
Method Details
-
tryReserve
boolean tryReserve()Attempts to reserve a connection for exclusive use untilreleaseAsync()
is called.- Returns:
true
if this connection is available and reserved for performing a single request.
-
releaseAsync
Completable releaseAsync()Must be called (and subscribed to) to signify the reservation has completed aftertryReserve()
.- Returns:
- a
Completable
for the release.
-