public class TransportAddressHelper extends Object
HostAndPort objects to Elasticsearch TransportAddress.| Constructor and Description |
|---|
TransportAddressHelper() |
| Modifier and Type | Method and Description |
|---|---|
static org.elasticsearch.common.transport.TransportAddress |
fromHostAndPort(com.google.common.net.HostAndPort hostAndPort)
Convert a
HostAndPort instance to TransportAddress. |
static org.elasticsearch.common.transport.TransportAddress[] |
fromHostAndPorts(List<com.google.common.net.HostAndPort> hostAndPorts)
Convert a list of
HostAndPort instances to an array of TransportAddress instances. |
public static org.elasticsearch.common.transport.TransportAddress fromHostAndPort(com.google.common.net.HostAndPort hostAndPort)
HostAndPort instance to TransportAddress. If the HostAndPort instance doesn't
contain a port the resulting TransportAddress will have DEFAULT_PORT as port.hostAndPort - a valid HostAndPort instanceTransportAddress equivalent to the provided HostAndPort instancepublic static org.elasticsearch.common.transport.TransportAddress[] fromHostAndPorts(List<com.google.common.net.HostAndPort> hostAndPorts)
HostAndPort instances to an array of TransportAddress instances.hostAndPorts - a List of valid HostAndPort instancesTransportAddress instancesfromHostAndPort(com.google.common.net.HostAndPort)Copyright © 2016. All rights reserved.