Class 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.
    • Constructor Detail

      • Instance

        public Instance​(java.lang.String nodeId,
                        java.lang.String host,
                        int port)
      • Instance

        public Instance​(java.lang.String nodeId,
                        java.lang.String host,
                        int port,
                        int sslPort)
    • 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 class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object