Interface ReservableRequestConcurrencyController
-
- All Superinterfaces:
RequestConcurrencyController
public interface ReservableRequestConcurrencyController extends RequestConcurrencyController
ARequestConcurrencyControllerthat 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 CompletablereleaseAsync()Must be called (and subscribed to) to signify the reservation has completed aftertryReserve().booleantryReserve()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:
trueif 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
Completablefor the release.
-
-