public final class NodeInfoUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static NodeInfo |
createNodeInfo(java.lang.String nodeIP,
java.lang.String rackName,
java.lang.String dataCenterName)
do not set if any one of the parameters are null
|
static NodeInfo |
decodeNodeInfo(java.lang.String nodeInfoStr)
decode the given String that is encoded with encodeNodeInfo method
each field is separated by a comma
|
static java.util.ArrayList<NodeInfo> |
decodeNodeInfoList(java.lang.String nodeInfoListStr)
decode the given String that is encoded with the method encodeNodeInfoList
each NodeInfoUtils object is separated by others with a semi colon
|
static java.lang.String |
encodeNodeInfo(NodeInfo nodeInfo)
encode the given NodeInfo object fields as a single line String
each field is separated by a comma
if the given NodeInfo is null, then return "null,null,null"
|
static java.lang.String |
encodeNodeInfoList(java.util.ArrayList<NodeInfo> nodeInfoList)
encode the objects in the given list as a single line String
each NodeInfo object is separated by others with a semi colon
|
static NodeInfo |
getNodeInfo(java.util.ArrayList<NodeInfo> nodeInfoList,
java.lang.String nodeIP)
find the NodeInfo object with the given nodeIP and return it
|
static java.lang.String |
listToString(java.util.ArrayList<NodeInfo> nodeInfoList)
convert the given list of NodeInfo objects to a multi-line string for printing
each NodeInfo object in a separate line
|
public static NodeInfo createNodeInfo(java.lang.String nodeIP, java.lang.String rackName, java.lang.String dataCenterName)
public static java.lang.String encodeNodeInfo(NodeInfo nodeInfo)
public static NodeInfo decodeNodeInfo(java.lang.String nodeInfoStr)
public static java.lang.String encodeNodeInfoList(java.util.ArrayList<NodeInfo> nodeInfoList)
public static java.util.ArrayList<NodeInfo> decodeNodeInfoList(java.lang.String nodeInfoListStr)
public static java.lang.String listToString(java.util.ArrayList<NodeInfo> nodeInfoList)
public static NodeInfo getNodeInfo(java.util.ArrayList<NodeInfo> nodeInfoList, java.lang.String nodeIP)