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
config, dnsMonitor, lazyConnectLatch, MAX_SLOT, serviceManager, singleSlotRange, subscribeService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
calcSlot
(byte[] key) int
calcSlot
(io.netty.buffer.ByteBuf key) int
protected CompletableFuture
<RedisClient> changeMaster
(int slot, RedisURI address) protected MasterSlaveServersConfig
create
(BaseMasterSlaveServersConfig<?> cfg) protected RedisClientConfig
createRedisConfig
(NodeType type, RedisURI address, int timeout, int commandTimeout, String sslHostname) void
getEntry
(int slot) getEntry
(InetSocketAddress address) getEntry
(RedisClient redisClient) int
getSlot
(MasterSlaveEntry entry) void
Methods inherited from class org.redisson.connection.MasterSlaveConnectionManager
closeNodeConnection, closeNodeConnections, connect, connectToNode, connectToNode, createClient, createClient, createClient, createCommandExecutor, disconnectNode, getEntry, getReadEntry, getServiceManager, getSubscribeService, getWriteEntry, internalShutdown, lazyConnect, shutdown, startDNSMonitoring
-
Constructor Details
-
ClusterConnectionManager
-
-
Method Details
-
create
- Overrides:
create
in classMasterSlaveConnectionManager
-
doConnect
- Overrides:
doConnect
in classMasterSlaveConnectionManager
-
getEntrySet
- Specified by:
getEntrySet
in interfaceConnectionManager
- Overrides:
getEntrySet
in classMasterSlaveConnectionManager
-
getEntry
- Specified by:
getEntry
in interfaceConnectionManager
- 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
public int calcSlot(io.netty.buffer.ByteBuf key) - Specified by:
calcSlot
in interfaceConnectionManager
- Overrides:
calcSlot
in classMasterSlaveConnectionManager
-
calcSlot
- Specified by:
calcSlot
in interfaceConnectionManager
- Overrides:
calcSlot
in classMasterSlaveConnectionManager
-
shutdown
- Specified by:
shutdown
in interfaceConnectionManager
- Overrides:
shutdown
in classMasterSlaveConnectionManager
-
getSlot
-
getLastClusterNode
- Specified by:
getLastClusterNode
in interfaceConnectionManager
- Overrides:
getLastClusterNode
in classMasterSlaveConnectionManager
-