@InterfaceAudience.Public @InterfaceStability.Stable public abstract class NodeId extends Object implements Comparable<NodeId>
NodeId
is the unique identifier for a node.
It includes the hostname and port to uniquely
identify the node. Thus, it is unique across restarts of any
NodeManager
.
Constructor and Description |
---|
NodeId() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
build() |
int |
compareTo(NodeId other) |
boolean |
equals(Object obj) |
static NodeId |
fromString(String nodeIdStr) |
abstract String |
getHost()
Get the hostname of the node.
|
abstract int |
getPort()
Get the port for communicating with the node.
|
int |
hashCode() |
static NodeId |
newInstance(String host,
int port) |
String |
toString() |
@InterfaceAudience.Public @InterfaceStability.Stable public static NodeId newInstance(String host, int port)
@InterfaceAudience.Public @InterfaceStability.Stable public abstract String getHost()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract int getPort()
public int compareTo(NodeId other)
compareTo
in interface Comparable<NodeId>
@InterfaceAudience.Public @InterfaceStability.Stable public static NodeId fromString(String nodeIdStr)
protected abstract void build()
Copyright © 2020 Apache Software Foundation. All rights reserved.