Package org.redisson.cluster
Class ClusterConnectionManager
- java.lang.Object
-
- org.redisson.connection.MasterSlaveConnectionManager
-
- org.redisson.cluster.ClusterConnectionManager
-
- All Implemented Interfaces:
ConnectionManager
public class ClusterConnectionManager extends MasterSlaveConnectionManager
- Author:
- Nikita Koksharov
-
-
Field Summary
-
Fields inherited from class org.redisson.connection.MasterSlaveConnectionManager
codec, config, dnsMonitor, group, id, MAX_SLOT, resolverGroup, singleSlotRange, socketChannelClass
-
-
Constructor Summary
Constructors Constructor Description ClusterConnectionManager(ClusterServersConfig cfg, Config config, UUID id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
calcSlot(byte[] key)
int
calcSlot(String key)
protected RedisClientConfig
createRedisConfig(NodeType type, URI address, int timeout, int commandTimeout, String sslHostname)
String
getConfigEndpointHostName()
URI
getLastClusterNode()
boolean
isClusterMode()
void
shutdown()
-
Methods inherited from class org.redisson.connection.MasterSlaveConnectionManager
addEntry, changeMaster, closeNodeConnection, closeNodeConnections, connectionReadOp, connectionWriteOp, connectToNode, create, createClient, createClient, createClient, createMasterSlaveEntry, getCfg, getCodec, getCommandExecutor, getConfig, getConnectionEventsHub, getConnectionWatcher, getEntry, getEntry, getEntry, getEntrySet, getExecutor, getGroup, getId, getShutdownLatch, getShutdownPromise, getSubscribeService, initSingleEntry, initTimer, isShutdown, isShuttingDown, newTimeout, releaseRead, releaseWrite, removeEntry, shutdown, startDNSMonitoring, stopThreads
-
-
-
-
Constructor Detail
-
ClusterConnectionManager
public ClusterConnectionManager(ClusterServersConfig cfg, Config config, UUID id)
-
-
Method Detail
-
createRedisConfig
protected RedisClientConfig createRedisConfig(NodeType type, URI address, int timeout, int commandTimeout, String sslHostname)
- Overrides:
createRedisConfig
in classMasterSlaveConnectionManager
-
getConfigEndpointHostName
public String getConfigEndpointHostName()
-
calcSlot
public int calcSlot(byte[] key)
- Specified by:
calcSlot
in interfaceConnectionManager
- Overrides:
calcSlot
in classMasterSlaveConnectionManager
-
calcSlot
public int calcSlot(String key)
- Specified by:
calcSlot
in interfaceConnectionManager
- Overrides:
calcSlot
in classMasterSlaveConnectionManager
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceConnectionManager
- Overrides:
shutdown
in classMasterSlaveConnectionManager
-
getLastClusterNode
public URI getLastClusterNode()
- Specified by:
getLastClusterNode
in interfaceConnectionManager
- Overrides:
getLastClusterNode
in classMasterSlaveConnectionManager
-
isClusterMode
public boolean isClusterMode()
- Specified by:
isClusterMode
in interfaceConnectionManager
- Overrides:
isClusterMode
in classMasterSlaveConnectionManager
-
-