Package org.redisson.cluster
Class ClusterConnectionManager
java.lang.Object
org.redisson.connection.MasterSlaveConnectionManager
org.redisson.cluster.ClusterConnectionManager
- All Implemented Interfaces:
ConnectionManager
- Author:
- Nikita Koksharov
-
Field Summary
Fields inherited from class org.redisson.connection.MasterSlaveConnectionManager
codec, config, dnsMonitor, DUMMY_TIMEOUT, group, id, MAX_SLOT, resolverGroup, singleSlotRange, socketChannelClass, subscribeService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapplyNatMap
(RedisURI address) int
calcSlot
(byte[] key) int
protected CompletableFuture<RedisClient>
changeMaster
(int slot, RedisURI address) protected RedisClientConfig
createRedisConfig
(NodeType type, RedisURI address, int timeout, int commandTimeout, String sslHostname) getEntry
(int slot) getEntry
(InetSocketAddress address) getEntry
(RedisClient redisClient) protected MasterSlaveEntry
boolean
void
shutdown()
Methods inherited from class org.redisson.connection.MasterSlaveConnectionManager
closeNodeConnection, closeNodeConnections, connectionReadOp, connectionWriteOp, connectToNode, connectToNode, create, createClient, createClient, createClient, createNodeNotFoundException, disconnectNode, getCfg, getCodec, getConfig, getConnectionEventsHub, getConnectionWatcher, getDisconnectedNodes, getElementsSubscribeService, getEntry, getExecutor, getGroup, getId, getShutdownLatch, getShutdownPromise, getSubscribeService, initSingleEntry, initTimer, isShutdown, isShuttingDown, newTimeout, releaseRead, releaseWrite, resolveIP, resolveIP, shutdown, startDNSMonitoring, stopThreads, toURI
-
Constructor Details
-
ClusterConnectionManager
-
-
Method Details
-
getEntrySet
- Specified by:
getEntrySet
in interfaceConnectionManager
- Overrides:
getEntrySet
in classMasterSlaveConnectionManager
-
getEntry
- Overrides:
getEntry
in classMasterSlaveConnectionManager
-
getEntry
- Specified by:
getEntry
in interfaceConnectionManager
- Overrides:
getEntry
in classMasterSlaveConnectionManager
-
getEntry
- Specified by:
getEntry
in interfaceConnectionManager
- Overrides:
getEntry
in classMasterSlaveConnectionManager
-
changeMaster
- Overrides:
changeMaster
in classMasterSlaveConnectionManager
-
getEntry
- Specified by:
getEntry
in interfaceConnectionManager
- Overrides:
getEntry
in classMasterSlaveConnectionManager
-
createRedisConfig
protected RedisClientConfig createRedisConfig(NodeType type, RedisURI address, int timeout, int commandTimeout, String sslHostname) - Overrides:
createRedisConfig
in classMasterSlaveConnectionManager
-
calcSlot
public int calcSlot(byte[] key) - Specified by:
calcSlot
in interfaceConnectionManager
- Overrides:
calcSlot
in classMasterSlaveConnectionManager
-
calcSlot
- Specified by:
calcSlot
in interfaceConnectionManager
- Overrides:
calcSlot
in classMasterSlaveConnectionManager
-
applyNatMap
- Specified by:
applyNatMap
in interfaceConnectionManager
- Overrides:
applyNatMap
in classMasterSlaveConnectionManager
-
shutdown
public void shutdown()- Specified by:
shutdown
in interfaceConnectionManager
- Overrides:
shutdown
in classMasterSlaveConnectionManager
-
getLastClusterNode
- Specified by:
getLastClusterNode
in interfaceConnectionManager
- Overrides:
getLastClusterNode
in classMasterSlaveConnectionManager
-
isClusterMode
public boolean isClusterMode()- Specified by:
isClusterMode
in interfaceConnectionManager
- Overrides:
isClusterMode
in classMasterSlaveConnectionManager
-