Interface LoadBalancer<C extends LoadBalancedConnection>

    • Method Detail

      • selectConnection

        Single<C> selectConnection​(java.util.function.Predicate<C> selector)
        Select the most appropriate connection for a request. Returned connection may be used concurrently for other requests.
        selector - A Function that evaluates a connection for selection. This selector should return null if the connection MUST not be selected. This selector is guaranteed to be called for any connection that is returned from this method.
        a Single that completes with the most appropriate connection to use.