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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JedisClusterConfig.Builder
Builder for initializing JedisClusterConfig.
-
Constructor Summary
Constructors Constructor Description JedisClusterConfig()
JedisClusterConfig(Set<InetSocketAddress> nodes, int timeout, int maxRedirections)
ConstructorJedisClusterConfig(Set<InetSocketAddress> nodes, int timeout, int maxRedirections, String password)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMaxRedirections()
Returns limit of redirection.Set<redis.clients.jedis.HostAndPort>
getNodes()
Returns nodes.String
getPassword()
Returns password.int
getTimeout()
Returns socket / connection timeout.
-
-
-
Constructor Detail
-
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 JedisClustertimeout
- socket / connection timeoutmaxRedirections
- 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 JedisClustertimeout
- socket / connection timeoutmaxRedirections
- limit of redirections - how much we'll follow MOVED or ASKpassword
- password, if any- Throws:
NullPointerException
- when you didn't set nodes
-
-
Method Detail
-
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
-
-