Interface RequestConcurrencyController
- All Known Subinterfaces:
ReservableRequestConcurrencyController
Deprecated.
This interface is not used by ServiceTalk internal code anymore and will be removed in the future
releases. If you depend on it, consider replicating this implementation in your codebase or reach out to us
explaining the use-case.
An interface which allows controlling reserving connections which maybe used concurrently.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.Must be called aftertryRequest()
to signify the request has completed.Deprecated.Attempts to reserve a connection for a single request, needs to be followed byrequestFinished()
.
-
Method Details
-
tryRequest
RequestConcurrencyController.Result tryRequest()Deprecated.Attempts to reserve a connection for a single request, needs to be followed byrequestFinished()
.- Returns:
RequestConcurrencyController.Result.Accepted
if this connection is available and reserved for performing a single request.
-
requestFinished
void requestFinished()Deprecated.Must be called aftertryRequest()
to signify the request has completed. This method should be called no more than once for each call totryRequest()
.Generally called from a
Publisher.beforeFinally(Runnable)
after atryRequest()
.
-