Class RedisInfo


  • public class RedisInfo
    extends Object
    Contains info about a single Redis server.
    Author:
    Matthew Tropiano
    • Constructor Detail

      • RedisInfo

        public RedisInfo​(String host,
                         int port)
        Creates a Redis info object, no timeout, nor password.
        Parameters:
        host - the server hostname or address.
        port - the server connection port.
      • RedisInfo

        public RedisInfo​(String host,
                         int port,
                         String password)
        Creates a Redis info object, no timeout.
        Parameters:
        host - the server hostname or address.
        port - the server connection port.
        password - the server database password.
      • RedisInfo

        public RedisInfo​(String host,
                         int port,
                         int db)
        Creates a Redis info object, no timeout, nor password.
        Parameters:
        host - the server hostname or address.
        port - the server connection port.
        db - the database index.
      • RedisInfo

        public RedisInfo​(String host,
                         int port,
                         String password,
                         int db)
        Creates a Redis info object, no timeout.
        Parameters:
        host - the server hostname or address.
        port - the server connection port.
        password - the server database password.
        db - the database index.
      • RedisInfo

        public RedisInfo​(String host,
                         int port,
                         int db,
                         int timeout)
        Creates a Redis info object, no password.
        Parameters:
        host - the server hostname or address.
        port - the server connection port.
        db - the database index.
        timeout - the server socket connection timeout in milliseconds. 0 is no timeout.
      • RedisInfo

        public RedisInfo​(String host,
                         int port,
                         String password,
                         int db,
                         int timeout)
        Creates a Redis info object.
        Parameters:
        host - the server hostname or address.
        port - the server connection port.
        password - the server database password.
        db - the database to use for this connection.
        timeout - the server socket connection timeout in milliseconds. 0 is no timeout.
    • Method Detail

      • getHost

        public String getHost()
        Returns:
        the server hostname or address
      • getPort

        public int getPort()
        Returns:
        the server connection port.
      • getPassword

        public String getPassword()
        Returns:
        the server database password. If null, no password is submitted.
      • getTimeout

        public int getTimeout()
        Returns:
        Gets the server connection timeout in milliseconds. 0 is no timeout.
      • getDB

        public int getDB()
        Returns:
        the database id for the connection to use.