public class AddrUtil extends Object
Constructor and Description |
---|
AddrUtil() |
Modifier and Type | Method and Description |
---|---|
static List<InetSocketAddress> |
getAddresses(String s)
Split a string in the form of "host:port host2:port" into a List of InetSocketAddress instances
suitable for instantiating a MemcachedClient.
|
static Map<InetSocketAddress,InetSocketAddress> |
getAddressMap(String s)
Split a string in the form of "host1:port1,host2:port2 host3:port3,host4:port4" into a Map of
InetSocketAddress instances suitable for instantiating a MemcachedClient,map's key is the main
memcached node,and value is the standby node for main node.
|
static InetSocketAddress |
getOneAddress(String server) |
static String |
getServerString(InetSocketAddress addr)
Create an unresolved server string (hostname:port) from an InetSocketAddress.
|
static boolean |
isEnableShutDownHook()
System property to control shutdown hook, issue #44
|
public static Map<InetSocketAddress,InetSocketAddress> getAddressMap(String s)
s
- public static List<InetSocketAddress> getAddresses(String s)
public static InetSocketAddress getOneAddress(String server)
public static boolean isEnableShutDownHook()
public static final String getServerString(InetSocketAddress addr)
Copyright © 2021. All rights reserved.