Class NodeId

java.lang.Object
com.tccc.kos.commons.util.NodeId

public class NodeId extends Object
A nodeId is the combination of a node type and node name. This class allows a nodeId to be created from the constituent parts or from a string representation of a nodeId.
Since:
1.0
Version:
2022-08-30
  • Constructor Details

    • NodeId

      public NodeId(String str)
    • NodeId

      public NodeId(String nodeType, String nodeName)
  • Method Details

    • getId

      public String getId()
      Return the id which is the composition of the nodeType and nodeName. This is equivalent to toString() .
    • getHostname

      public String getHostname()
      Return a hostname representation of the nodeId. kOS will write node hostnames for nodes into /etc/hosts files allowing name resolution based on this hostname.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getNodeType

      public String getNodeType()
    • getNodeName

      public String getNodeName()
    • setNodeType

      public void setNodeType(String nodeType)
    • setNodeName

      public void setNodeName(String nodeName)
    • setId

      public void setId(String id)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object