public class JedisClusterConfig extends Object implements Serializable
Configuration for JedisCluster.
Modifier and Type | Class and Description |
---|---|
static class |
JedisClusterConfig.Builder
Builder for initializing JedisClusterConfig.
|
Constructor and Description |
---|
JedisClusterConfig(Set<InetSocketAddress> nodes,
int timeout,
int maxRedirections)
Constructor You can use JedisClusterConfig.Builder() for leaving some fields to apply default value.
|
Modifier and Type | Method and Description |
---|---|
int |
getMaxRedirections()
Returns limit of redirection.
|
Set<redis.clients.jedis.HostAndPort> |
getNodes()
Returns nodes.
|
int |
getTimeout()
Returns socket / connection timeout.
|
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.nodes
- list of node information for JedisClustertimeout
- socket / connection timeoutmaxRedirections
- limit of redirections - how much we’ll follow MOVED or ASKNullPointerException
- when you didn’t set nodespublic Set<redis.clients.jedis.HostAndPort> getNodes()
Returns nodes.
public int getTimeout()
Returns socket / connection timeout.
public int getMaxRedirections()
Returns limit of redirection.
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.