Package org.redisson.connection.balancer
Class LoadBalancerManager
java.lang.Object
org.redisson.connection.balancer.LoadBalancerManager
- Author:
- Nikita Koksharov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ConnectionManagerprotected final PubSubConnectionPoolprotected final SlaveConnectionPool -
Constructor Summary
ConstructorsConstructorDescriptionLoadBalancerManager(MasterSlaveServersConfig config, ConnectionManager connectionManager, MasterSlaveEntry entry) -
Method Summary
Modifier and TypeMethodDescriptionadd(ClientConnectionsEntry entry) voidchangeType(InetSocketAddress address, NodeType nodeType) booleancontains(InetSocketAddress addr) booleancontains(RedisClient redisClient) booleanfreeze(InetSocketAddress address, ClientConnectionsEntry.FreezeReason freezeReason) freeze(ClientConnectionsEntry connectionEntry, ClientConnectionsEntry.FreezeReason freezeReason) freeze(RedisURI address, ClientConnectionsEntry.FreezeReason freezeReason) intintgetConnection(RedisCommand<?> command, RedisClient client) getConnection(RedisCommand<?> command, RedisURI addr) getEntry(RedisClient redisClient) nextConnection(RedisCommand<?> command) voidreturnConnection(RedisConnection connection) voidreturnPubSubConnection(RedisPubSubConnection connection) booleanunfreeze(InetSocketAddress address, ClientConnectionsEntry.FreezeReason freezeReason) booleanunfreeze(ClientConnectionsEntry entry, ClientConnectionsEntry.FreezeReason freezeReason) booleanunfreeze(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
-