Package net.spy.memcached
Class AddrUtil
java.lang.Object
net.spy.memcached.AddrUtil
Convenience utilities for simplifying common address parsing.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic List<InetSocketAddress> 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 List<InetSocketAddress> getAddresses(List<String> servers) static List<InetSocketAddress> getAddressesFromURL(List<URL> servers) static ClusterConfigurationparseClusterTypeConfiguration(String configurationResponse) Parse response from getConfig for cluster type.
-
Field Details
-
HOST_CONFIG_DELIMITER
public static final char HOST_CONFIG_DELIMITER- See Also:
-
-
Method Details
-
getAddresses
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
-
getAddressesFromURL
-
parseClusterTypeConfiguration
Parse response from getConfig for cluster type. version number hostname1|ipaddress1|port hostname2|ipaddress2|port returns the ClusterConfiguration object which contains the parsed results.
-