public class JedisClusterInfoCache extends Object
Constructor and Description |
---|
JedisClusterInfoCache(JedisClientConfig clientConfig) |
JedisClusterInfoCache(JedisClientConfig clientConfig,
org.apache.commons.pool2.impl.GenericObjectPoolConfig<Connection> poolConfig) |
Modifier and Type | Method and Description |
---|---|
void |
assignSlotsToNode(List<Integer> targetSlots,
HostAndPort targetNode) |
void |
assignSlotToNode(int slot,
HostAndPort targetNode) |
void |
discoverClusterNodesAndSlots(Connection jedis) |
Pool<Connection> |
getNode(HostAndPort node) |
Pool<Connection> |
getNode(String nodeKey) |
static String |
getNodeKey(HostAndPort hnp) |
Map<String,Pool<Connection>> |
getNodes() |
List<Pool<Connection>> |
getShuffledNodesPool() |
HostAndPort |
getSlotNode(int slot) |
Pool<Connection> |
getSlotPool(int slot) |
void |
renewClusterSlots(Connection jedis) |
void |
reset()
Clear discovered nodes collections and gently release allocated resources
|
Pool<Connection> |
setupNodeIfNotExist(HostAndPort node) |
public JedisClusterInfoCache(JedisClientConfig clientConfig)
public JedisClusterInfoCache(JedisClientConfig clientConfig, org.apache.commons.pool2.impl.GenericObjectPoolConfig<Connection> poolConfig)
public void discoverClusterNodesAndSlots(Connection jedis)
public void renewClusterSlots(Connection jedis)
public Pool<Connection> setupNodeIfNotExist(HostAndPort node)
public void assignSlotToNode(int slot, HostAndPort targetNode)
public void assignSlotsToNode(List<Integer> targetSlots, HostAndPort targetNode)
public Pool<Connection> getNode(String nodeKey)
public Pool<Connection> getNode(HostAndPort node)
public Pool<Connection> getSlotPool(int slot)
public HostAndPort getSlotNode(int slot)
public Map<String,Pool<Connection>> getNodes()
public List<Pool<Connection>> getShuffledNodesPool()
public void reset()
public static String getNodeKey(HostAndPort hnp)
Copyright © 2021. All rights reserved.