public class JedisClusterInfoCache extends Object
| Constructor and Description |
|---|
JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig,
int timeout) |
JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig,
int connectionTimeout,
int soTimeout) |
| Modifier and Type | Method and 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 resources
|
JedisPool |
setupNodeIfNotExist(HostAndPort node) |
public JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig,
int timeout)
public JedisClusterInfoCache(org.apache.commons.pool2.impl.GenericObjectPoolConfig poolConfig,
int connectionTimeout,
int soTimeout)
public void discoverClusterNodesAndSlots(Jedis jedis)
public void renewClusterSlots(Jedis jedis)
public JedisPool setupNodeIfNotExist(HostAndPort node)
public void assignSlotToNode(int slot,
HostAndPort targetNode)
public void assignSlotsToNode(List<Integer> targetSlots, HostAndPort targetNode)
public JedisPool getSlotPool(int slot)
public void reset()
public static String getNodeKey(HostAndPort hnp)
Copyright © 2016. All rights reserved.