Interface RequestConcurrencyController
-
- All Known Subinterfaces:
ReservableRequestConcurrencyController
public interface RequestConcurrencyControllerAn interface which allows controlling reserving connections which maybe used concurrently.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classRequestConcurrencyController.ResultResult of thetryRequest()call.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidrequestFinished()Must be called aftertryRequest()to signify the request has completed.RequestConcurrencyController.ResulttryRequest()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.Acceptedif 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().
-
-