org.apache.hadoop.metrics2.util

## Class Servers

- java.lang.Object
- - org.apache.hadoop.metrics2.util.Servers

-     @InterfaceAudience.Public
       @InterfaceStability.Evolving
      public class Servers
      extends Object

  Helpers to handle server addresses

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static List<InetSocketAddress>` | `parse(String specs, int defaultPort)` Parses a space and/or comma separated sequence of server specifications of the form hostname or hostname:port.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### parse

          public static List<InetSocketAddress> parse(String specs,
                                                      int defaultPort)

      Parses a space and/or comma separated sequence of server specifications of the form hostname or hostname:port. If the specs string is null, defaults to localhost:defaultPort.
      Parameters:
        `specs` - server specs (see description)
        `defaultPort` - the default port if not specified
      Returns:
        a list of InetSocketAddress objects.

Copyright © 2022 Apache Software Foundation. All rights reserved.