Class NodeId

java.lang.Object
io.atomix.utils.AbstractIdentifier<String>
io.atomix.cluster.NodeId
All Implemented Interfaces:
io.atomix.utils.Identifier<String>, Comparable<NodeId>
Direct Known Subclasses:
MemberId

public class NodeId
extends io.atomix.utils.AbstractIdentifier<String>
implements Comparable<NodeId>
Node identifier.
  • Constructor Summary

    Constructors 
    Constructor Description
    NodeId​(String id)
    Creates a new cluster node identifier from the specified string.
  • Method Summary

    Modifier and Type Method Description
    static NodeId anonymous()
    Creates a new cluster node identifier from the specified string.
    int compareTo​(NodeId that)  
    boolean equals​(Object object)  
    static NodeId from​(String id)
    Creates a new cluster node identifier from the specified string.
    int hashCode()  

    Methods inherited from class io.atomix.utils.AbstractIdentifier

    id, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • NodeId

      public NodeId​(String id)
      Creates a new cluster node identifier from the specified string.
      Parameters:
      id - string identifier
  • Method Details

    • anonymous

      public static NodeId anonymous()
      Creates a new cluster node identifier from the specified string.
      Returns:
      node id
    • from

      public static NodeId from​(String id)
      Creates a new cluster node identifier from the specified string.
      Parameters:
      id - string identifier
      Returns:
      node id
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class io.atomix.utils.AbstractIdentifier<String>
    • equals

      public boolean equals​(Object object)
      Overrides:
      equals in class io.atomix.utils.AbstractIdentifier<String>
    • compareTo

      public int compareTo​(NodeId that)
      Specified by:
      compareTo in interface Comparable<NodeId>