Class NetUtils

java.lang.Object
org.apache.bookkeeper.net.NetUtils

public class NetUtils extends Object
Network Utilities.
  • Constructor Details

    • NetUtils

      public NetUtils()
  • Method Details

    • normalizeHostName

      public static String normalizeHostName(String name)
      Given a string representation of a host, return its ip address in textual presentation.
      Parameters:
      name - a string representation of a host: either a textual representation its IP address or its host name
      Returns:
      its IP address in the string format
    • normalizeHostNames

      public static List<String> normalizeHostNames(Collection<String> names)
      Given a collection of string representation of hosts, return a list of corresponding IP addresses in the textual representation.
      Parameters:
      names - a collection of string representations of hosts
      Returns:
      a list of corresponding IP addresses in the string format
      See Also:
    • resolveNetworkLocation

      public static String resolveNetworkLocation(DNSToSwitchMapping dnsResolver, BookieSocketAddress addr)