Class SimpleNodeId

java.lang.Object
org.graylog2.plugin.system.NodeId
org.graylog2.plugin.system.SimpleNodeId
Record Components:
nodeId - This is the actual ID. It's expected to be in the UID format, but it's not enforced anyhow now.

public class SimpleNodeId extends NodeId
This is a simple record holding the ID only. All logic is provided by the NodeId interface. Notice that the class is package-protected and integrations won't be able to create own instances. This is most likely not an issue, as typical use case is to let the server inject the NodeId instance.
  • Constructor Details

    • SimpleNodeId

      public SimpleNodeId(String nodeId)
  • Method Details

    • getNodeId

      public String getNodeId()
      Specified by:
      getNodeId in class NodeId
      Returns:
      The server expects UUID style of node id.
      See Also:
    • toString

      public String toString()
      This method is kept for compatibility reasons. Some integrations may rely on the toString call returning the actual node ID.
      Overrides:
      toString in class Object
      Returns:
      the node ID, same value as the getNodeId() call.