Class Host

java.lang.Object
com.aerospike.client.Host

public final class Host extends Object
Host name/port of database server.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final String
    Host name or IP address of database server.
    final int
    Port of database server.
    final String
    TLS certificate name used for secure connections.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Host(String name, int port)
    Initialize host.
    Host(String name, String tlsName, int port)
    Initialize host.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    static Host[]
    parseHosts(String str, int defaultPort)
    Parse command-line hosts from string format: hostname1[:tlsname1][:port1],...
    static List<Host>
    Parse server service hosts from string format: hostname1:port1,...
     

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • name

      public final String name
      Host name or IP address of database server.
    • tlsName

      public final String tlsName
      TLS certificate name used for secure connections.
    • port

      public final int port
      Port of database server.
  • Constructor Details

    • Host

      public Host(String name, int port)
      Initialize host.
    • Host

      public Host(String name, String tlsName, int port)
      Initialize host.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • parseHosts

      public static Host[] parseHosts(String str, int defaultPort)
      Parse command-line hosts from string format: hostname1[:tlsname1][:port1],...

      Hostname may also be an IP address in the following formats.

      • IPv4: xxx.xxx.xxx.xxx
      • IPv6: [xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx]
      • IPv6: [xxxx::xxxx]
      IPv6 addresses must be enclosed by brackets. tlsname and port are optional.
    • parseServiceHosts

      public static List<Host> parseServiceHosts(String str)
      Parse server service hosts from string format: hostname1:port1,...

      Hostname may also be an IP address in the following formats.

      • IPv4: xxx.xxx.xxx.xxx
      • IPv6: [xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx]
      • IPv6: [xxxx::xxxx]
      IPv6 addresses must be enclosed by brackets.