Interface ReservableRequestConcurrencyController
-
- All Superinterfaces:
RequestConcurrencyController
public interface ReservableRequestConcurrencyController extends RequestConcurrencyController
ARequestConcurrencyController
that also allows totryReserve()
a connection for exclusive use.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.servicetalk.client.api.internal.RequestConcurrencyController
RequestConcurrencyController.Result
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Completable
releaseAsync()
Must be called (and subscribed to) to signify the reservation has completed aftertryReserve()
.boolean
tryReserve()
Attempts to reserve a connection for exclusive use untilreleaseAsync()
is called.-
Methods inherited from interface io.servicetalk.client.api.internal.RequestConcurrencyController
requestFinished, tryRequest
-
-
-
-
Method Detail
-
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.
-
-