Package redis.clients.jedis
Class JedisClusterInfoCache
java.lang.Object
redis.clients.jedis.JedisClusterInfoCache
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JedisClientConfigprivate static final intprivate final Map<String, ConnectionPool> private final org.apache.commons.pool2.impl.GenericObjectPoolConfig<Connection> private final Lockprivate final Lockprivate final ReentrantReadWriteLockprivate final HostAndPort[]private final ConnectionPool[]private final Set<HostAndPort> private final Lock -
Constructor Summary
ConstructorsConstructorDescriptionJedisClusterInfoCache(JedisClientConfig clientConfig) Deprecated.JedisClusterInfoCache(JedisClientConfig clientConfig, Set<HostAndPort> startNodes) JedisClusterInfoCache(JedisClientConfig clientConfig, org.apache.commons.pool2.impl.GenericObjectPoolConfig<Connection> poolConfig) Deprecated.JedisClusterInfoCache(JedisClientConfig clientConfig, org.apache.commons.pool2.impl.GenericObjectPoolConfig<Connection> poolConfig, Set<HostAndPort> startNodes) -
Method Summary
Modifier and TypeMethodDescriptionvoidassignSlotsToNode(List<Integer> targetSlots, HostAndPort targetNode) voidassignSlotToNode(int slot, HostAndPort targetNode) voidprivate voiddiscoverClusterSlots(Connection jedis) executeClusterSlots(Connection jedis) private HostAndPortgenerateHostAndPort(List<Object> hostInfos) getAssignedSlotArray(List<Object> slotInfo) getNode(HostAndPort node) static StringgetNodeKey(HostAndPort hnp) getNodes()getSlotNode(int slot) getSlotPool(int slot) voidrenewClusterSlots(Connection jedis) voidreset()Clear discovered nodes collections and gently release allocated resources
-
Field Details
-
nodes
-
slots
-
slotNodes
-
rwl
-
r
-
w
-
rediscoverLock
-
poolConfig
-
clientConfig
-
startNodes
-
MASTER_NODE_INDEX
private static final int MASTER_NODE_INDEX- See Also:
-
-
Constructor Details
-
JedisClusterInfoCache
Deprecated. -
JedisClusterInfoCache
@Deprecated public JedisClusterInfoCache(JedisClientConfig clientConfig, org.apache.commons.pool2.impl.GenericObjectPoolConfig<Connection> poolConfig) Deprecated. -
JedisClusterInfoCache
-
JedisClusterInfoCache
public JedisClusterInfoCache(JedisClientConfig clientConfig, org.apache.commons.pool2.impl.GenericObjectPoolConfig<Connection> poolConfig, Set<HostAndPort> startNodes)
-
-
Method Details
-
discoverClusterNodesAndSlots
-
renewClusterSlots
-
discoverClusterSlots
-
generateHostAndPort
-
setupNodeIfNotExist
-
assignSlotToNode
-
assignSlotsToNode
-
getNode
-
getNode
-
getSlotPool
-
getSlotNode
-
getNodes
-
getShuffledNodesPool
-
reset
public void reset()Clear discovered nodes collections and gently release allocated resources -
getNodeKey
-
executeClusterSlots
-
getAssignedSlotArray
-