Interface HostProvider<T extends HostProvider<T>>


@Deprecated public interface HostProvider<T extends HostProvider<T>>
Deprecated.
since 5.0
Infrastructure helper class aware of hosts within the cluster and the health of those allowing easy selection of active ones.
Since:
3.2
Author:
Christoph Strobl, Mark Paluch, Peter-Josef Meisch
  • Method Details

    • provider

      static HostProvider<?> provider(WebClientProvider clientProvider, Supplier<HttpHeaders> headersSupplier, InetSocketAddress... endpoints)
      Deprecated.
      Create a new HostProvider best suited for the given WebClientProvider and number of hosts.
      Parameters:
      clientProvider - must not be null .
      headersSupplier - to supply custom headers, must not be null
      endpoints - must not be null nor empty.
      Returns:
      new instance of HostProvider.
    • lookupActiveHost

      default reactor.core.publisher.Mono<InetSocketAddress> lookupActiveHost()
      Deprecated.
      Lookup an active host in lazy mode utilizing cached ElasticsearchHost.
      Returns:
      the Mono emitting the active host or an error if none found.
    • lookupActiveHost

      reactor.core.publisher.Mono<InetSocketAddress> lookupActiveHost(HostProvider.Verification verification)
      Deprecated.
      Lookup an active host in using the given HostProvider.Verification.
      Parameters:
      verification -
      Returns:
      the Mono emitting the active host or an error (NoReachableHostException) if none found.
    • getActive

      default reactor.core.publisher.Mono<WebClient> getActive()
      Deprecated.
      Get the WebClient connecting to an active host utilizing cached ElasticsearchHost.
      Returns:
      the Mono emitting the client for an active host or an error if none found.
    • getActive

      default reactor.core.publisher.Mono<WebClient> getActive(HostProvider.Verification verification)
      Deprecated.
      Get the WebClient connecting to an active host.
      Parameters:
      verification - must not be null.
      Returns:
      the Mono emitting the client for an active host or an error if none found.
    • getWebClient

      default reactor.core.publisher.Mono<WebClient> getWebClient()
      Deprecated.
      Get the WebClient connecting to an active host utilizing cached ElasticsearchHost.
      Returns:
      the Mono emitting the client for an active host or an error if none found.
      Since:
      4.4
    • getWebClient

      default reactor.core.publisher.Mono<WebClient> getWebClient(HostProvider.Verification verification)
      Deprecated.
      Get the WebClient connecting to an active host.
      Parameters:
      verification - must not be null.
      Returns:
      the Mono emitting the client for an active host or an error if none found.
      Since:
      4.4
    • createWebClient

      WebClient createWebClient(InetSocketAddress endpoint)
      Deprecated.
      Creates a WebClient for endpoint.
      Parameters:
      endpoint - must not be null.
      Returns:
      a WebClient using the the given endpoint as transport url.
    • clusterInfo

      reactor.core.publisher.Mono<HostProvider.ClusterInformation> clusterInfo()
      Deprecated.
      Obtain information about known cluster nodes.
      Returns:
      the Mono emitting HostProvider.ClusterInformation when available.