Class IpUtils
- java.lang.Object
-
- org.terracotta.angela.common.util.IpUtils
-
public class IpUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description IpUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanareAllLocal(Collection<String> targetServerNames)static StringgetHostName()static booleanisLocal(String name)Try to determine (but not accurately) if a given name matches a local address.
-
-
-
Method Detail
-
isLocal
public static boolean isLocal(String name)
Try to determine (but not accurately) if a given name matches a local address. A local address is a local IP or local hostname.This "name" can be any Angela generated names (i.e. in case of client arrays instanceId or symbolic names), we do not use "getByName()" to avoid any dns resolution
-
areAllLocal
public static boolean areAllLocal(Collection<String> targetServerNames)
-
getHostName
public static String getHostName()
-
-