Class AddrUtil

java.lang.Object
net.spy.memcached.AddrUtil

public final class AddrUtil extends Object
Convenience utilities for simplifying common address parsing.
  • Constructor Details

    • AddrUtil

      private AddrUtil()
  • Method Details

    • getAddresses

      public static List<InetSocketAddress> getAddresses(String s)
      Split a string containing whitespace or comma separated host or IP addresses and port numbers of the form "host:port host2:port" or "host:port, host2:port" into a List of InetSocketAddress instances suitable for instantiating a MemcachedClient. Note that colon-delimited IPv6 is also supported. For example: ::1:11211
    • getAddresses

      public static List<InetSocketAddress> getAddresses(List<String> servers)
    • getAddressesFromURL

      public static List<InetSocketAddress> getAddressesFromURL(List<URL> servers)