Package org.redisson.connection.balancer
Class CommandsLoadBalancer
java.lang.Object
org.redisson.connection.balancer.RoundRobinLoadBalancer
org.redisson.connection.balancer.CommandsLoadBalancer
- All Implemented Interfaces:
LoadBalancer
Load Balancer redirects specified commands to the Redis node with specified address.
- Author:
- Nikita Koksharov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEntry(List<ClientConnectionsEntry> clientsCopy, RedisCommand<?> redisCommand) voidsetAddress(String address) Defines Redis node address where the commands are redirected tovoidsetCommands(List<String> commands) Defines command names which are redirected to the Redis node specified bysetAddress(String)Methods inherited from class org.redisson.connection.balancer.RoundRobinLoadBalancer
getEntryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.redisson.connection.balancer.LoadBalancer
getEntry
-
Constructor Details
-
CommandsLoadBalancer
public CommandsLoadBalancer()
-
-
Method Details
-
getEntry
public ClientConnectionsEntry getEntry(List<ClientConnectionsEntry> clientsCopy, RedisCommand<?> redisCommand) - Specified by:
getEntryin interfaceLoadBalancer
-
setAddress
Defines Redis node address where the commands are redirected to- Parameters:
address- Redis node address
-
setCommands
Defines command names which are redirected to the Redis node specified bysetAddress(String)- Parameters:
commands- commands list
-