public class ElasticsearchHost extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ElasticsearchHost.State |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PORT
Default HTTP port for Elasticsearch servers.
|
| Constructor and Description |
|---|
ElasticsearchHost(InetSocketAddress endpoint,
ElasticsearchHost.State state) |
| Modifier and Type | Method and Description |
|---|---|
InetSocketAddress |
getEndpoint() |
ElasticsearchHost.State |
getState() |
Instant |
getTimestamp() |
boolean |
isOnline() |
static ElasticsearchHost |
offline(InetSocketAddress host) |
static ElasticsearchHost |
online(InetSocketAddress host) |
static InetSocketAddress |
parse(String hostAndPort)
Parse a hostAndPort string into a
InetSocketAddress. |
String |
toString() |
public static final int DEFAULT_PORT
public ElasticsearchHost(InetSocketAddress endpoint, ElasticsearchHost.State state)
public static ElasticsearchHost online(InetSocketAddress host)
host - must not be null.ElasticsearchHost.public static ElasticsearchHost offline(InetSocketAddress host)
host - must not be null.ElasticsearchHost.public static InetSocketAddress parse(String hostAndPort)
InetSocketAddress.hostAndPort - the string containing host and port or IP address and port in the format host:port.InetSocketAddress.public boolean isOnline()
ElasticsearchHost.State was ElasticsearchHost.State.ONLINEpublic InetSocketAddress getEndpoint()
public ElasticsearchHost.State getState()
ElasticsearchHost.State.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.