Package org.redisson.connection.balancer
Class WeightedRoundRobinBalancer
- java.lang.Object
-
- org.redisson.connection.balancer.WeightedRoundRobinBalancer
-
- All Implemented Interfaces:
LoadBalancer
public class WeightedRoundRobinBalancer extends Object implements LoadBalancer
Weighted Round Robin balancer.- Author:
- Nikita Koksharov
-
-
Constructor Summary
Constructors Constructor Description WeightedRoundRobinBalancer(Map<String,Integer> weights, int defaultWeight)
Creates weighted round robin balancer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientConnectionsEntry
getEntry(List<ClientConnectionsEntry> clients)
-
-
-
Constructor Detail
-
WeightedRoundRobinBalancer
public WeightedRoundRobinBalancer(Map<String,Integer> weights, int defaultWeight)
Creates weighted round robin balancer.- Parameters:
weights
- - weight mapped by slave node addr inredis://host:port
formatdefaultWeight
- - default weight value assigns to slaves not defined in weights map
-
-
Method Detail
-
getEntry
public ClientConnectionsEntry getEntry(List<ClientConnectionsEntry> clients)
- Specified by:
getEntry
in interfaceLoadBalancer
-
-