Class JedisClusterConfig

java.lang.Object
org.apache.storm.redis.common.config.JedisClusterConfig
All Implemented Interfaces:
Serializable

public class JedisClusterConfig extends Object implements Serializable
Configuration for JedisCluster.
See Also:
  • Constructor Details

    • JedisClusterConfig

      public JedisClusterConfig()
    • JedisClusterConfig

      public JedisClusterConfig(Set<InetSocketAddress> nodes, int timeout, int maxRedirections)
      Constructor

      You can use JedisClusterConfig.Builder() for leaving some fields to apply default value.

      Note that list of node is mandatory, and when you didn't set nodes, it throws NullPointerException.

      Parameters:
      nodes - list of node information for JedisCluster
      timeout - socket / connection timeout
      maxRedirections - limit of redirections - how much we'll follow MOVED or ASK
      Throws:
      NullPointerException - when you didn't set nodes
    • JedisClusterConfig

      public JedisClusterConfig(Set<InetSocketAddress> nodes, int timeout, int maxRedirections, String password)
      Constructor

      You can use JedisClusterConfig.Builder() for leaving some fields to apply default value.

      Note that list of node is mandatory, and when you didn't set nodes, it throws NullPointerException.

      Parameters:
      nodes - list of node information for JedisCluster
      timeout - socket / connection timeout
      maxRedirections - limit of redirections - how much we'll follow MOVED or ASK
      password - password, if any
      Throws:
      NullPointerException - when you didn't set nodes
  • Method Details

    • getNodes

      public Set<redis.clients.jedis.HostAndPort> getNodes()
      Returns nodes.
      Returns:
      list of node information
    • getTimeout

      public int getTimeout()
      Returns socket / connection timeout.
      Returns:
      socket / connection timeout
    • getMaxRedirections

      public int getMaxRedirections()
      Returns limit of redirection.
      Returns:
      limit of redirection
    • getPassword

      public String getPassword()
      Returns password.
      Returns:
      password