public class ClusterConnectionProvider extends java.lang.Object implements ConnectionProvider
| Modifier and Type | Field and Description |
|---|---|
protected JedisClusterInfoCache |
cache |
| Constructor and Description |
|---|
ClusterConnectionProvider(java.util.Set<HostAndPort> clusterNodes,
JedisClientConfig clientConfig) |
ClusterConnectionProvider(java.util.Set<HostAndPort> clusterNodes,
JedisClientConfig clientConfig,
Cache clientSideCache) |
ClusterConnectionProvider(java.util.Set<HostAndPort> clusterNodes,
JedisClientConfig clientConfig,
Cache clientSideCache,
org.apache.commons.pool2.impl.GenericObjectPoolConfig<Connection> poolConfig) |
ClusterConnectionProvider(java.util.Set<HostAndPort> clusterNodes,
JedisClientConfig clientConfig,
Cache clientSideCache,
org.apache.commons.pool2.impl.GenericObjectPoolConfig<Connection> poolConfig,
java.time.Duration topologyRefreshPeriod) |
ClusterConnectionProvider(java.util.Set<HostAndPort> clusterNodes,
JedisClientConfig clientConfig,
org.apache.commons.pool2.impl.GenericObjectPoolConfig<Connection> poolConfig) |
ClusterConnectionProvider(java.util.Set<HostAndPort> clusterNodes,
JedisClientConfig clientConfig,
org.apache.commons.pool2.impl.GenericObjectPoolConfig<Connection> poolConfig,
java.time.Duration topologyRefreshPeriod) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Connection |
getConnection() |
Connection |
getConnection(CommandArguments args) |
Connection |
getConnection(HostAndPort node) |
Connection |
getConnectionFromSlot(int slot) |
java.util.Map<java.lang.String,ConnectionPool> |
getConnectionMap() |
HostAndPort |
getNode(int slot) |
java.util.Map<java.lang.String,ConnectionPool> |
getNodes() |
java.util.Map<java.lang.String,ConnectionPool> |
getPrimaryNodes() |
java.util.Map<java.lang.String,ConnectionPool> |
getPrimaryNodesConnectionMap() |
Connection |
getReplicaConnection(CommandArguments args) |
Connection |
getReplicaConnectionFromSlot(int slot) |
void |
renewSlotCache() |
void |
renewSlotCache(Connection jedis) |
protected final JedisClusterInfoCache cache
public ClusterConnectionProvider(java.util.Set<HostAndPort> clusterNodes, JedisClientConfig clientConfig)
@Experimental public ClusterConnectionProvider(java.util.Set<HostAndPort> clusterNodes, JedisClientConfig clientConfig, Cache clientSideCache)
public ClusterConnectionProvider(java.util.Set<HostAndPort> clusterNodes, JedisClientConfig clientConfig, org.apache.commons.pool2.impl.GenericObjectPoolConfig<Connection> poolConfig)
@Experimental public ClusterConnectionProvider(java.util.Set<HostAndPort> clusterNodes, JedisClientConfig clientConfig, Cache clientSideCache, org.apache.commons.pool2.impl.GenericObjectPoolConfig<Connection> poolConfig)
public ClusterConnectionProvider(java.util.Set<HostAndPort> clusterNodes, JedisClientConfig clientConfig, org.apache.commons.pool2.impl.GenericObjectPoolConfig<Connection> poolConfig, java.time.Duration topologyRefreshPeriod)
@Experimental public ClusterConnectionProvider(java.util.Set<HostAndPort> clusterNodes, JedisClientConfig clientConfig, Cache clientSideCache, org.apache.commons.pool2.impl.GenericObjectPoolConfig<Connection> poolConfig, java.time.Duration topologyRefreshPeriod)
public void close()
close in interface java.lang.AutoCloseablepublic void renewSlotCache()
public void renewSlotCache(Connection jedis)
public java.util.Map<java.lang.String,ConnectionPool> getNodes()
public java.util.Map<java.lang.String,ConnectionPool> getPrimaryNodes()
public HostAndPort getNode(int slot)
public Connection getConnection(HostAndPort node)
public Connection getConnection(CommandArguments args)
getConnection in interface ConnectionProviderpublic Connection getReplicaConnection(CommandArguments args)
public Connection getConnection()
getConnection in interface ConnectionProviderpublic Connection getConnectionFromSlot(int slot)
public Connection getReplicaConnectionFromSlot(int slot)
public java.util.Map<java.lang.String,ConnectionPool> getConnectionMap()
getConnectionMap in interface ConnectionProviderpublic java.util.Map<java.lang.String,ConnectionPool> getPrimaryNodesConnectionMap()
getPrimaryNodesConnectionMap in interface ConnectionProviderCopyright © 2025. All rights reserved.