Class Instance

java.lang.Object
com.linkedin.venice.meta.Instance

public class Instance extends Object
Class defines the Instance in Venice. // TODO: Bad name. Too generic. Let's find a better one.
  • Constructor Details

    • Instance

      public Instance(String nodeId, String host, int port)
    • Instance

      public Instance(String nodeId, String host, int port, int grpcPort, int grpcSslPort)
    • Instance

      public Instance(String nodeId, String host, int port, int sslPort, int grpcPort, int grpcSslPort)
  • Method Details

    • fromHostAndPort

      public static Instance fromHostAndPort(String hostName, int port)
    • getHostUrl

      public String getHostUrl(boolean isSSL)
    • fromNodeId

      public static Instance fromNodeId(String nodeId)
    • getNodeId

      public String getNodeId()
    • getHost

      public String getHost()
    • getPort

      public int getPort()
    • getSslPort

      public int getSslPort()
    • getGrpcPort

      public int getGrpcPort()
    • getGrpcSslPort

      public int getGrpcSslPort()
    • getGrpcUrl

      public String getGrpcUrl()
    • getGrpcSslUrl

      public String getGrpcSslUrl()
    • getUrl

      public 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 String getUrl()
      Deprecated.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object