Package com.linkedin.venice.meta
Class Instance
- java.lang.Object
-
- com.linkedin.venice.meta.Instance
-
public class Instance extends java.lang.Object
Class defines the Instance in Venice. // TODO: Bad name. Too generic. Let's find a better one.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
static Instance
fromHostAndPort(java.lang.String hostName, int port)
static Instance
fromNodeId(java.lang.String nodeId)
java.lang.String
getHost()
java.lang.String
getHostUrl(boolean isSSL)
java.lang.String
getNodeId()
int
getPort()
int
getSslPort()
java.lang.String
getUrl()
Deprecated.java.lang.String
getUrl(boolean https)
Convenience method for getting a host and port based url.int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
fromHostAndPort
public static Instance fromHostAndPort(java.lang.String hostName, int port)
-
getHostUrl
public java.lang.String getHostUrl(boolean isSSL)
-
fromNodeId
public static Instance fromNodeId(java.lang.String nodeId)
-
getNodeId
public java.lang.String getNodeId()
-
getHost
public java.lang.String getHost()
-
getPort
public int getPort()
-
getSslPort
public int getSslPort()
-
getUrl
public java.lang.String getUrl(boolean https)
Convenience method for getting a host and port based url. Wraps IPv6 host strings in square brackets- Parameters:
https
- sets the scheme: false for http, true for https- Returns:
- http(s):// + host + : + port
-
getUrl
@Deprecated public java.lang.String getUrl()
Deprecated.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-