public interface HostProvider<T extends HostProvider<T>>
| Modifier and Type | Interface and Description |
|---|---|
static class |
HostProvider.ClusterInformation
Value object accumulating information about an Elasticsearch cluster.
|
static class |
HostProvider.Verification
HostProvider.Verification allows to influence the lookup strategy for active hosts. |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<HostProvider.ClusterInformation> |
clusterInfo()
Obtain information about known cluster nodes.
|
WebClient |
createWebClient(InetSocketAddress endpoint)
|
default reactor.core.publisher.Mono<WebClient> |
getActive()
Get the
WebClient connecting to an active host utilizing cached ElasticsearchHost. |
default reactor.core.publisher.Mono<WebClient> |
getActive(HostProvider.Verification verification)
Get the
WebClient connecting to an active host. |
default reactor.core.publisher.Mono<WebClient> |
getWebClient()
Get the
WebClient connecting to an active host utilizing cached ElasticsearchHost. |
default reactor.core.publisher.Mono<WebClient> |
getWebClient(HostProvider.Verification verification)
Get the
WebClient connecting to an active host. |
default reactor.core.publisher.Mono<InetSocketAddress> |
lookupActiveHost()
Lookup an active host in
lazy mode utilizing cached ElasticsearchHost. |
reactor.core.publisher.Mono<InetSocketAddress> |
lookupActiveHost(HostProvider.Verification verification)
Lookup an active host in using the given
HostProvider.Verification. |
static HostProvider<?> |
provider(WebClientProvider clientProvider,
Supplier<HttpHeaders> headersSupplier,
InetSocketAddress... endpoints)
Create a new
HostProvider best suited for the given WebClientProvider and number of hosts. |
static HostProvider<?> provider(WebClientProvider clientProvider, Supplier<HttpHeaders> headersSupplier, InetSocketAddress... endpoints)
HostProvider best suited for the given WebClientProvider and number of hosts.clientProvider - must not be null .headersSupplier - to supply custom headers, must not be nullendpoints - must not be null nor empty.HostProvider.default reactor.core.publisher.Mono<InetSocketAddress> lookupActiveHost()
lazy mode utilizing cached ElasticsearchHost.Mono emitting the active host or an error if none found.reactor.core.publisher.Mono<InetSocketAddress> lookupActiveHost(HostProvider.Verification verification)
HostProvider.Verification.verification - Mono emitting the active host or an error
(NoReachableHostException) if none found.default reactor.core.publisher.Mono<WebClient> getActive()
WebClient connecting to an active host utilizing cached ElasticsearchHost.Mono emitting the client for an active host or an error if none
found.default reactor.core.publisher.Mono<WebClient> getActive(HostProvider.Verification verification)
WebClient connecting to an active host.verification - must not be null.Mono emitting the client for an active host or an error if none
found.default reactor.core.publisher.Mono<WebClient> getWebClient()
WebClient connecting to an active host utilizing cached ElasticsearchHost.Mono emitting the client for an active host or an error if none
found.default reactor.core.publisher.Mono<WebClient> getWebClient(HostProvider.Verification verification)
WebClient connecting to an active host.verification - must not be null.Mono emitting the client for an active host or an error if none
found.WebClient createWebClient(InetSocketAddress endpoint)
endpoint - must not be null.WebClient using the the given endpoint as transport url.reactor.core.publisher.Mono<HostProvider.ClusterInformation> clusterInfo()
Mono emitting HostProvider.ClusterInformation when available.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.