Class HostAndPort

java.lang.Object
redis.clients.jedis.HostAndPort
All Implemented Interfaces:
Serializable

public class HostAndPort extends Object implements Serializable
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • host

      private final String host
    • port

      private final int port
  • Constructor Details

    • HostAndPort

      public HostAndPort(String host, int port)
  • Method Details

    • getHost

      public String getHost()
    • getPort

      public int getPort()
    • equals

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

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

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

      public static HostAndPort from(String string)
      Creates HostAndPort with unconverted host.
      Parameters:
      string - String to parse. Must be in "host:port" format. Port is mandatory.
      Returns:
      parsed HostAndPort