Class AddrUtil


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

      Constructors 
      Modifier Constructor Description
      private AddrUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<java.net.InetSocketAddress> getAddresses​(java.lang.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.
      static java.util.List<java.net.InetSocketAddress> getAddresses​(java.util.List<java.lang.String> servers)  
      static java.util.List<java.net.InetSocketAddress> getAddressesFromURL​(java.util.List<java.net.URL> servers)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AddrUtil

        private AddrUtil()
    • Method Detail

      • getAddresses

        public static java.util.List<java.net.InetSocketAddress> getAddresses​(java.lang.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 java.util.List<java.net.InetSocketAddress> getAddresses​(java.util.List<java.lang.String> servers)
      • getAddressesFromURL

        public static java.util.List<java.net.InetSocketAddress> getAddressesFromURL​(java.util.List<java.net.URL> servers)