Class JedisClusterConfig
java.lang.Object
org.apache.storm.redis.common.config.JedisClusterConfig
- All Implemented Interfaces:
Serializable
Configuration for JedisCluster.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder for initializing JedisClusterConfig. -
Constructor Summary
ConstructorDescriptionJedisClusterConfig
(Set<InetSocketAddress> nodes, int timeout, int maxRedirections) ConstructorJedisClusterConfig
(Set<InetSocketAddress> nodes, int timeout, int maxRedirections, String password) Constructor -
Method Summary
-
Constructor Details
-
JedisClusterConfig
public JedisClusterConfig() -
JedisClusterConfig
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 Details
-
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
Returns password.- Returns:
- password
-