Class NetworkService

java.lang.Object
org.elasticsearch.common.network.NetworkService

public final class NetworkService extends Object
  • Field Details

    • DEFAULT_NETWORK_HOST

      public static final String DEFAULT_NETWORK_HOST
      By default, we bind to loopback interfaces
      See Also:
    • NETWORK_SERVER

      public static final Setting<Boolean> NETWORK_SERVER
    • GLOBAL_NETWORK_HOST_SETTING

      public static final Setting<List<String>> GLOBAL_NETWORK_HOST_SETTING
    • GLOBAL_NETWORK_BIND_HOST_SETTING

      public static final Setting<List<String>> GLOBAL_NETWORK_BIND_HOST_SETTING
    • GLOBAL_NETWORK_PUBLISH_HOST_SETTING

      public static final Setting<List<String>> GLOBAL_NETWORK_PUBLISH_HOST_SETTING
    • TCP_NO_DELAY

      public static final Setting<Boolean> TCP_NO_DELAY
    • TCP_KEEP_ALIVE

      public static final Setting<Boolean> TCP_KEEP_ALIVE
    • TCP_KEEP_IDLE

      public static final Setting<Integer> TCP_KEEP_IDLE
    • TCP_KEEP_INTERVAL

      public static final Setting<Integer> TCP_KEEP_INTERVAL
    • TCP_KEEP_COUNT

      public static final Setting<Integer> TCP_KEEP_COUNT
    • TCP_REUSE_ADDRESS

      public static final Setting<Boolean> TCP_REUSE_ADDRESS
    • TCP_SEND_BUFFER_SIZE

      public static final Setting<ByteSizeValue> TCP_SEND_BUFFER_SIZE
    • TCP_RECEIVE_BUFFER_SIZE

      public static final Setting<ByteSizeValue> TCP_RECEIVE_BUFFER_SIZE
    • TCP_CONNECT_TIMEOUT

      public static final Setting<org.elasticsearch.core.TimeValue> TCP_CONNECT_TIMEOUT
  • Constructor Details

  • Method Details

    • resolveBindHostAddresses

      public InetAddress[] resolveBindHostAddresses(String[] bindHosts) throws IOException
      Resolves bindHosts 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

      public InetAddress resolvePublishHostAddresses(String[] publishHosts) throws IOException
      Resolves publishHosts 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