diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerName.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerName.java index acd6ee7de32..48b4a79d7a2 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerName.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerName.java @@ -147,14 +147,29 @@ public class ServerName implements Comparable, Serializable { return Long.parseLong(serverName.substring(index + 1)); } + /** + * Retrieve an instance of ServerName. + * Callers should use the equals method to compare returned instances, though we may return + * a shared immutable object as an internal optimization. + */ public static ServerName valueOf(final String hostname, final int port, final long startcode) { return new ServerName(hostname, port, startcode); } + /** + * Retrieve an instance of ServerName. + * Callers should use the equals method to compare returned instances, though we may return + * a shared immutable object as an internal optimization. + */ public static ServerName valueOf(final String serverName) { return new ServerName(serverName); } + /** + * Retrieve an instance of ServerName. + * Callers should use the equals method to compare returned instances, though we may return + * a shared immutable object as an internal optimization. + */ public static ServerName valueOf(final String hostAndPort, final long startCode) { return new ServerName(hostAndPort, startCode); }