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() |
JedisClusterConfig(Set<InetSocketAddress> nodes,
int timeout,
int maxRedirections)
Constructor You can use JedisClusterConfig.Builder() for leaving some fields to apply default value.
|
JedisClusterConfig(Set<InetSocketAddress> nodes,
int timeout,
int maxRedirections,
String password)
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.
|
String |
getPassword()
Returns password.
|
int |
getTimeout()
Returns socket / connection timeout.
|
public 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.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 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.nodes
- list of node information for JedisClustertimeout
- socket / connection timeoutmaxRedirections
- limit of redirections - how much we’ll follow MOVED or ASKpassword
- password, if anyNullPointerException
- 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.
public String getPassword()
Returns password.
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.