Package org.redisson.connection.balancer
Class LoadBalancerManager
java.lang.Object
org.redisson.connection.balancer.LoadBalancerManager
- Author:
- Nikita Koksharov
-
Field Summary
Modifier and TypeFieldDescriptionprotected final ConnectionManager
protected final PubSubConnectionPool
protected final SlaveConnectionPool
-
Constructor Summary
ConstructorDescriptionLoadBalancerManager
(MasterSlaveServersConfig config, ConnectionManager connectionManager, MasterSlaveEntry entry) -
Method Summary
Modifier and TypeMethodDescriptionadd
(ClientConnectionsEntry entry) void
changeType
(InetSocketAddress address, NodeType nodeType) boolean
contains
(InetSocketAddress addr) boolean
contains
(RedisClient redisClient) boolean
freeze
(InetSocketAddress address, ClientConnectionsEntry.FreezeReason freezeReason) freeze
(ClientConnectionsEntry connectionEntry, ClientConnectionsEntry.FreezeReason freezeReason) freeze
(RedisURI address, ClientConnectionsEntry.FreezeReason freezeReason) int
int
getConnection
(RedisCommand<?> command, RedisClient client) getConnection
(RedisCommand<?> command, RedisURI addr) getEntry
(RedisClient redisClient) nextConnection
(RedisCommand<?> command) void
returnConnection
(RedisConnection connection) void
returnPubSubConnection
(RedisPubSubConnection connection) boolean
unfreeze
(InetSocketAddress address, ClientConnectionsEntry.FreezeReason freezeReason) boolean
unfreeze
(ClientConnectionsEntry entry, ClientConnectionsEntry.FreezeReason freezeReason) boolean
unfreeze
(RedisURI address, ClientConnectionsEntry.FreezeReason freezeReason) unfreezeAsync
(InetSocketAddress address, ClientConnectionsEntry.FreezeReason freezeReason) unfreezeAsync
(ClientConnectionsEntry entry, ClientConnectionsEntry.FreezeReason freezeReason) unfreezeAsync
(RedisURI address, ClientConnectionsEntry.FreezeReason freezeReason)
-
Field Details
-
connectionManager
-
pubSubConnectionPool
-
slaveConnectionPool
-
-
Constructor Details
-
LoadBalancerManager
public LoadBalancerManager(MasterSlaveServersConfig config, ConnectionManager connectionManager, MasterSlaveEntry entry)
-
-
Method Details
-
changeType
-
add
-
getEntries
-
getAvailableSlaves
public int getAvailableSlaves() -
getAvailableClients
public int getAvailableClients() -
unfreeze
-
unfreezeAsync
public CompletableFuture<Boolean> unfreezeAsync(RedisURI address, ClientConnectionsEntry.FreezeReason freezeReason) -
unfreezeAsync
public CompletableFuture<Boolean> unfreezeAsync(InetSocketAddress address, ClientConnectionsEntry.FreezeReason freezeReason) -
unfreeze
public boolean unfreeze(InetSocketAddress address, ClientConnectionsEntry.FreezeReason freezeReason) -
unfreeze
public boolean unfreeze(ClientConnectionsEntry entry, ClientConnectionsEntry.FreezeReason freezeReason) -
unfreezeAsync
public CompletableFuture<Boolean> unfreezeAsync(ClientConnectionsEntry entry, ClientConnectionsEntry.FreezeReason freezeReason) -
freeze
public ClientConnectionsEntry freeze(RedisURI address, ClientConnectionsEntry.FreezeReason freezeReason) -
freeze
public ClientConnectionsEntry freeze(InetSocketAddress address, ClientConnectionsEntry.FreezeReason freezeReason) -
freeze
public ClientConnectionsEntry freeze(ClientConnectionsEntry connectionEntry, ClientConnectionsEntry.FreezeReason freezeReason) -
nextPubSubConnection
-
contains
-
contains
-
contains
-
getEntry
-
getEntry
-
getConnection
-
getConnection
public CompletableFuture<RedisConnection> getConnection(RedisCommand<?> command, RedisClient client) -
nextConnection
-
returnPubSubConnection
-
returnConnection
-
shutdownAsync
-