Class NetworkUtils

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

public abstract class NetworkUtils
extends java.lang.Object
Utilities for network interfaces / addresses binding and publishing. Its only intended for that purpose, not general purpose usage!!!!
  • Field Summary

    Fields
    Modifier and Type Field Description
    static boolean SUPPORTS_V6
    Deprecated.
    transition mechanism only, do not use
  • Method Summary

    Modifier and Type Method Description
    static boolean defaultReuseAddress()
    Returns system default for SO_REUSEADDR
    static void sortAddresses​(java.util.List<java.net.InetAddress> list)
    Deprecated.
    remove this when multihoming is really correct

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SUPPORTS_V6

      @Deprecated public static final boolean SUPPORTS_V6
      Deprecated.
      transition mechanism only, do not use
      True if we can bind to a v6 address. Its silly, but for *binding* we have a need to know if the stack works. this can prevent scary noise on IPv4-only hosts.
  • Method Details

    • sortAddresses

      @Deprecated public static void sortAddresses​(java.util.List<java.net.InetAddress> list)
      Deprecated.
      remove this when multihoming is really correct
      Sorts addresses by order of preference. This is used to pick the first one for publishing
    • defaultReuseAddress

      public static boolean defaultReuseAddress()
      Returns system default for SO_REUSEADDR