Interface ReservableRequestConcurrencyController

All Superinterfaces:
RequestConcurrencyController
All Known Subinterfaces:
FilterableStreamingHttpLoadBalancedConnection, LoadBalancedConnection
All Known Implementing Classes:
DelegatingFilterableStreamingHttpLoadBalancedConnection, HttpLoadBalancerFactory.DefaultFilterableStreamingHttpLoadBalancedConnection

public interface ReservableRequestConcurrencyController extends RequestConcurrencyController
A RequestConcurrencyController that also allows to tryReserve() a connection for exclusive use.
  • Method Details

    • tryReserve

      boolean tryReserve()
      Attempts to reserve a connection for exclusive use until releaseAsync() 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 after tryReserve().
      Returns:
      a Completable for the release.