Interface RequestConcurrencyController
-
- All Known Subinterfaces:
ReservableRequestConcurrencyController
public interface RequestConcurrencyController
An interface which allows controlling reserving connections which maybe used concurrently.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
RequestConcurrencyController.Result
Result of thetryRequest()
call.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
requestFinished()
Must be called aftertryRequest()
to signify the request has completed.RequestConcurrencyController.Result
tryRequest()
Attempts to reserve a connection for a single request, needs to be followed byrequestFinished()
.
-
-
-
Method Detail
-
tryRequest
RequestConcurrencyController.Result tryRequest()
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()
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()
.
-
-