public class ClusterConnectionManager extends MasterSlaveConnectionManager
codec, config, dnsMonitor, DUMMY_TIMEOUT, group, id, MAX_SLOT, resolverGroup, singleSlotRange, socketChannelClass, subscribeService
Constructor and Description |
---|
ClusterConnectionManager(ClusterServersConfig cfg,
Config config,
UUID id) |
Modifier and Type | Method and Description |
---|---|
RedisURI |
applyNatMap(RedisURI address) |
int |
calcSlot(byte[] key) |
int |
calcSlot(String key) |
protected RFuture<RedisClient> |
changeMaster(int slot,
RedisURI address) |
protected RedisClientConfig |
createRedisConfig(NodeType type,
RedisURI address,
int timeout,
int commandTimeout,
String sslHostname) |
MasterSlaveEntry |
getEntry(InetSocketAddress address) |
MasterSlaveEntry |
getEntry(int slot) |
MasterSlaveEntry |
getEntry(RedisClient redisClient) |
protected MasterSlaveEntry |
getEntry(RedisURI addr) |
Collection<MasterSlaveEntry> |
getEntrySet() |
RedisURI |
getLastClusterNode() |
boolean |
isClusterMode() |
void |
shutdown() |
closeNodeConnection, closeNodeConnections, connectionReadOp, connectionWriteOp, connectToNode, create, createClient, createClient, createClient, createNodeNotFoundFuture, disconnectNode, disconnectNode, getCfg, getCodec, getCommandExecutor, getConfig, getConnectionEventsHub, getConnectionWatcher, getDisconnectedNodes, getElementsSubscribeService, getEntry, getExecutor, getGroup, getId, getShutdownLatch, getShutdownPromise, getSubscribeService, initSingleEntry, initTimer, isShutdown, isShuttingDown, newTimeout, releaseRead, releaseWrite, shutdown, startDNSMonitoring, stopThreads
public ClusterConnectionManager(ClusterServersConfig cfg, Config config, UUID id)
public Collection<MasterSlaveEntry> getEntrySet()
getEntrySet
in interface ConnectionManager
getEntrySet
in class MasterSlaveConnectionManager
protected MasterSlaveEntry getEntry(RedisURI addr)
getEntry
in class MasterSlaveConnectionManager
public MasterSlaveEntry getEntry(RedisClient redisClient)
getEntry
in interface ConnectionManager
getEntry
in class MasterSlaveConnectionManager
public MasterSlaveEntry getEntry(InetSocketAddress address)
getEntry
in interface ConnectionManager
getEntry
in class MasterSlaveConnectionManager
protected RFuture<RedisClient> changeMaster(int slot, RedisURI address)
changeMaster
in class MasterSlaveConnectionManager
public MasterSlaveEntry getEntry(int slot)
getEntry
in interface ConnectionManager
getEntry
in class MasterSlaveConnectionManager
protected RedisClientConfig createRedisConfig(NodeType type, RedisURI address, int timeout, int commandTimeout, String sslHostname)
createRedisConfig
in class MasterSlaveConnectionManager
public int calcSlot(byte[] key)
calcSlot
in interface ConnectionManager
calcSlot
in class MasterSlaveConnectionManager
public int calcSlot(String key)
calcSlot
in interface ConnectionManager
calcSlot
in class MasterSlaveConnectionManager
public RedisURI applyNatMap(RedisURI address)
applyNatMap
in interface ConnectionManager
applyNatMap
in class MasterSlaveConnectionManager
public void shutdown()
shutdown
in interface ConnectionManager
shutdown
in class MasterSlaveConnectionManager
public RedisURI getLastClusterNode()
getLastClusterNode
in interface ConnectionManager
getLastClusterNode
in class MasterSlaveConnectionManager
public boolean isClusterMode()
isClusterMode
in interface ConnectionManager
isClusterMode
in class MasterSlaveConnectionManager
Copyright © 2014–2020 Redisson. All rights reserved.