Package redis.clients.jedis.providers
Class ClusterConnectionProvider
java.lang.Object
redis.clients.jedis.providers.ClusterConnectionProvider
- All Implemented Interfaces:
AutoCloseable,ConnectionProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final JedisClusterInfoCacheprivate static final String -
Constructor Summary
ConstructorsConstructorDescriptionClusterConnectionProvider(Set<HostAndPort> clusterNodes, JedisClientConfig clientConfig) ClusterConnectionProvider(Set<HostAndPort> clusterNodes, JedisClientConfig clientConfig, org.apache.commons.pool2.impl.GenericObjectPoolConfig<Connection> poolConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()getConnection(HostAndPort node) getConnectionFromSlot(int slot) getNode(int slot) getNodes()private voidinitializeSlotsCache(Set<HostAndPort> startNodes, JedisClientConfig clientConfig) voidvoidrenewSlotCache(Connection jedis)
-
Field Details
-
INIT_NO_ERROR_PROPERTY
- See Also:
-
cache
-
-
Constructor Details
-
ClusterConnectionProvider
-
ClusterConnectionProvider
public ClusterConnectionProvider(Set<HostAndPort> clusterNodes, JedisClientConfig clientConfig, org.apache.commons.pool2.impl.GenericObjectPoolConfig<Connection> poolConfig)
-
-
Method Details
-
initializeSlotsCache
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
renewSlotCache
public void renewSlotCache() -
renewSlotCache
-
getNodes
-
getNode
-
getConnection
-
getConnection
- Specified by:
getConnectionin interfaceConnectionProvider
-
getConnection
- Specified by:
getConnectionin interfaceConnectionProvider
-
getConnectionFromSlot
-
getConnectionMap
- Specified by:
getConnectionMapin interfaceConnectionProvider
-