20 lines
422 B
Java
20 lines
422 B
Java
package redis.clients.jedis;
|
|
|
|
import java.util.Set;
|
|
|
|
public class JedisRandomConnectionHandler extends JedisClusterConnectionHandler {
|
|
|
|
public JedisRandomConnectionHandler(Set<HostAndPort> nodes) {
|
|
super(nodes);
|
|
}
|
|
|
|
public Jedis getConnection() {
|
|
return getRandomConnection().getResource();
|
|
}
|
|
|
|
@Override
|
|
Jedis getConnectionFromSlot(int slot) {
|
|
return getRandomConnection().getResource();
|
|
}
|
|
}
|