Package org.elasticsearch.common.network
Class NetworkService
java.lang.Object
org.elasticsearch.common.network.NetworkService
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
A custom name resolver can support custom lookup keys (my_net_key:ipv4) and also change the default inet address used in case no settings is provided. -
Field Summary
Modifier and TypeFieldDescriptionstatic String
By default, we bind to loopback interfacesstatic Setting<org.elasticsearch.core.TimeValue>
static Setting<ByteSizeValue>
static Setting<ByteSizeValue>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionresolveBindHostAddresses(String[] bindHosts)
ResolvesbindHosts
to a list of internet addresses.resolvePublishHostAddresses(String[] publishHosts)
ResolvespublishHosts
to a single publish address.
-
Field Details
-
DEFAULT_NETWORK_HOST
By default, we bind to loopback interfaces- See Also:
- Constant Field Values
-
NETWORK_SERVER
-
GLOBAL_NETWORK_HOST_SETTING
-
GLOBAL_NETWORK_BIND_HOST_SETTING
-
GLOBAL_NETWORK_PUBLISH_HOST_SETTING
-
TCP_NO_DELAY
-
TCP_KEEP_ALIVE
-
TCP_KEEP_IDLE
-
TCP_KEEP_INTERVAL
-
TCP_KEEP_COUNT
-
TCP_REUSE_ADDRESS
-
TCP_SEND_BUFFER_SIZE
-
TCP_RECEIVE_BUFFER_SIZE
-
TCP_CONNECT_TIMEOUT
-
-
Constructor Details
-
NetworkService
-
-
Method Details
-
resolveBindHostAddresses
ResolvesbindHosts
to a list of internet addresses. The list will not contain duplicate addresses.- Parameters:
bindHosts
- list of hosts to bind to. this may contain special pseudo-hostnames such as _local_ (see the documentation). if it is null, it will fall back to _local_- Returns:
- unique set of internet addresses
- Throws:
IOException
-
resolvePublishHostAddresses
ResolvespublishHosts
to a single publish address. The fact that it returns only one address is just a current limitation.If
publishHosts
resolves to more than one address, then one is selected with magic- Parameters:
publishHosts
- list of hosts to publish as. this may contain special pseudo-hostnames such as _local_ (see the documentation). if it is null, it will fall back to _local_- Returns:
- single internet address
- Throws:
IOException
-