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 voidassignSlotsToNode(List<Integer> targetSlots, HostAndPort targetNode)voidassignSlotToNode(int slot, HostAndPort targetNode)voiddiscoverClusterNodesAndSlots(Jedis jedis)JedisPoolgetNode(String nodeKey)static StringgetNodeKey(Client client)static StringgetNodeKey(HostAndPort hnp)static StringgetNodeKey(Jedis jedis)Map<String,JedisPool>getNodes()List<JedisPool>getShuffledNodesPool()JedisPoolgetSlotPool(int slot)voidrenewClusterSlots(Jedis jedis)voidreset()Clear discovered nodes collections and gently release allocated resourcesJedisPoolsetupNodeIfNotExist(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)
-
-