Package redis.clients.jedis
Class JedisClusterInfoCache
- java.lang.Object
-
- redis.clients.jedis.JedisClusterInfoCache
-
public class JedisClusterInfoCache extends Object
-
-
Constructor Summary
Constructors Constructor Description JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig, int timeout)
JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig, int connectionTimeout, int soTimeout, int infiniteSoTimeout, String password, String clientName)
JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig, int connectionTimeout, int soTimeout, int infiniteSoTimeout, String user, String password, String clientName)
JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig, int connectionTimeout, int soTimeout, int infiniteSoTimeout, String user, String password, String clientName, boolean ssl, SSLSocketFactory sslSocketFactory, SSLParameters sslParameters, HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap)
JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig, int connectionTimeout, int soTimeout, String password, String clientName)
JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig, int connectionTimeout, int soTimeout, String password, String clientName, boolean ssl, SSLSocketFactory sslSocketFactory, SSLParameters sslParameters, HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap)
JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig, int connectionTimeout, int soTimeout, String user, String password, String clientName)
JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig, int connectionTimeout, int soTimeout, String user, String password, String clientName, boolean ssl, SSLSocketFactory sslSocketFactory, SSLParameters sslParameters, HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assignSlotsToNode(List<Integer> targetSlots, HostAndPort targetNode)
void
assignSlotToNode(int slot, HostAndPort targetNode)
void
discoverClusterNodesAndSlots(Jedis jedis)
JedisPool
getNode(String nodeKey)
static String
getNodeKey(Client client)
static String
getNodeKey(HostAndPort hnp)
static String
getNodeKey(Jedis jedis)
Map<String,JedisPool>
getNodes()
List<JedisPool>
getShuffledNodesPool()
JedisPool
getSlotPool(int slot)
void
renewClusterSlots(Jedis jedis)
void
reset()
Clear discovered nodes collections and gently release allocated resourcesJedisPool
setupNodeIfNotExist(HostAndPort node)
-
-
-
Constructor Detail
-
JedisClusterInfoCache
public JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig, int timeout)
-
JedisClusterInfoCache
public JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig, int connectionTimeout, int soTimeout, String password, String clientName)
-
JedisClusterInfoCache
public JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig, int connectionTimeout, int soTimeout, int infiniteSoTimeout, String password, String clientName)
-
JedisClusterInfoCache
public JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig, int connectionTimeout, int soTimeout, String user, String password, String clientName)
-
JedisClusterInfoCache
public JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig, int connectionTimeout, int soTimeout, int infiniteSoTimeout, String user, String password, String clientName)
-
JedisClusterInfoCache
public JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig, int connectionTimeout, int soTimeout, String password, String clientName, boolean ssl, SSLSocketFactory sslSocketFactory, SSLParameters sslParameters, HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap)
-
JedisClusterInfoCache
public JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig, int connectionTimeout, int soTimeout, String user, String password, String clientName, boolean ssl, SSLSocketFactory sslSocketFactory, SSLParameters sslParameters, HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap)
-
JedisClusterInfoCache
public JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig, int connectionTimeout, int soTimeout, int infiniteSoTimeout, String user, String password, String clientName, boolean ssl, SSLSocketFactory sslSocketFactory, SSLParameters sslParameters, HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap)
-
-
Method Detail
-
discoverClusterNodesAndSlots
public void discoverClusterNodesAndSlots(Jedis jedis)
-
renewClusterSlots
public void renewClusterSlots(Jedis jedis)
-
setupNodeIfNotExist
public JedisPool setupNodeIfNotExist(HostAndPort node)
-
assignSlotToNode
public void assignSlotToNode(int slot, HostAndPort targetNode)
-
assignSlotsToNode
public void assignSlotsToNode(List<Integer> targetSlots, HostAndPort targetNode)
-
getSlotPool
public JedisPool getSlotPool(int slot)
-
reset
public void reset()
Clear discovered nodes collections and gently release allocated resources
-
getNodeKey
public static String getNodeKey(HostAndPort hnp)
-
-