Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
redis.clients.jedis.JedisCluster Maven / Gradle / Ivy
package redis.clients.jedis;
import redis.clients.jedis.args.*;
import redis.clients.jedis.commands.JedisClusterCommands;
import redis.clients.jedis.commands.JedisClusterScriptingCommands;
import redis.clients.jedis.commands.MultiKeyJedisClusterCommands;
import redis.clients.jedis.commands.ProtocolCommand;
import redis.clients.jedis.params.*;
import redis.clients.jedis.resps.*;
import redis.clients.jedis.util.JedisClusterHashTag;
import redis.clients.jedis.util.KeyMergeUtil;
import java.time.Duration;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocketFactory;
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
public class JedisCluster extends BinaryJedisCluster implements JedisClusterCommands,
MultiKeyJedisClusterCommands, JedisClusterScriptingCommands {
public JedisCluster(HostAndPort node) {
this(Collections.singleton(node));
}
public JedisCluster(HostAndPort node, int timeout) {
this(Collections.singleton(node), timeout);
}
public JedisCluster(HostAndPort node, int timeout, int maxAttempts) {
this(Collections.singleton(node), timeout, maxAttempts);
}
public JedisCluster(HostAndPort node, final GenericObjectPoolConfig poolConfig) {
this(Collections.singleton(node), poolConfig);
}
public JedisCluster(HostAndPort node, int timeout, final GenericObjectPoolConfig poolConfig) {
this(Collections.singleton(node), timeout, poolConfig);
}
public JedisCluster(HostAndPort node, int timeout, int maxAttempts,
final GenericObjectPoolConfig poolConfig) {
this(Collections.singleton(node), timeout, maxAttempts, poolConfig);
}
public JedisCluster(HostAndPort node, int connectionTimeout, int soTimeout, int maxAttempts,
final GenericObjectPoolConfig poolConfig) {
this(Collections.singleton(node), connectionTimeout, soTimeout, maxAttempts, poolConfig);
}
public JedisCluster(HostAndPort node, int connectionTimeout, int soTimeout, int maxAttempts,
String password, final GenericObjectPoolConfig poolConfig) {
this(Collections.singleton(node), connectionTimeout, soTimeout, maxAttempts, password,
poolConfig);
}
public JedisCluster(HostAndPort node, int connectionTimeout, int soTimeout, int maxAttempts,
String password, String clientName, final GenericObjectPoolConfig poolConfig) {
this(Collections.singleton(node), connectionTimeout, soTimeout, maxAttempts, password,
clientName, poolConfig);
}
public JedisCluster(HostAndPort node, int connectionTimeout, int soTimeout, int maxAttempts,
String user, String password, String clientName,
final GenericObjectPoolConfig poolConfig) {
this(Collections.singleton(node), connectionTimeout, soTimeout, maxAttempts, user, password,
clientName, poolConfig);
}
public JedisCluster(HostAndPort node, int connectionTimeout, int soTimeout, int maxAttempts,
String password, String clientName, final GenericObjectPoolConfig poolConfig,
boolean ssl) {
this(Collections.singleton(node), connectionTimeout, soTimeout, maxAttempts, password,
clientName, poolConfig, ssl);
}
public JedisCluster(HostAndPort node, int connectionTimeout, int soTimeout, int maxAttempts,
String user, String password, String clientName,
final GenericObjectPoolConfig poolConfig, boolean ssl) {
this(Collections.singleton(node), connectionTimeout, soTimeout, maxAttempts, user, password,
clientName, poolConfig, ssl);
}
/**
* @deprecated This constructor will be removed in next major release.
*/
@Deprecated
public JedisCluster(HostAndPort node, int connectionTimeout, int soTimeout, int maxAttempts,
String password, String clientName, final GenericObjectPoolConfig poolConfig,
boolean ssl, SSLSocketFactory sslSocketFactory, SSLParameters sslParameters,
HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap) {
this(Collections.singleton(node), connectionTimeout, soTimeout, maxAttempts, password,
clientName, poolConfig, ssl, sslSocketFactory, sslParameters, hostnameVerifier,
hostAndPortMap);
}
/**
* @deprecated This constructor will be removed in next major release.
*/
@Deprecated
public JedisCluster(HostAndPort node, int connectionTimeout, int soTimeout, int maxAttempts,
String user, String password, String clientName,
final GenericObjectPoolConfig poolConfig, boolean ssl,
SSLSocketFactory sslSocketFactory, SSLParameters sslParameters,
HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap) {
this(Collections.singleton(node), connectionTimeout, soTimeout, maxAttempts, user, password,
clientName, poolConfig, ssl, sslSocketFactory, sslParameters, hostnameVerifier,
hostAndPortMap);
}
public JedisCluster(HostAndPort node, final JedisClientConfig clientConfig, int maxAttempts,
final GenericObjectPoolConfig poolConfig) {
this(Collections.singleton(node), clientConfig, maxAttempts, poolConfig);
}
public JedisCluster(Set nodes) {
this(nodes, DEFAULT_TIMEOUT);
}
public JedisCluster(Set nodes, int timeout) {
this(nodes, timeout, DEFAULT_MAX_ATTEMPTS);
}
public JedisCluster(Set nodes, int timeout, int maxAttempts) {
this(nodes, timeout, maxAttempts, new GenericObjectPoolConfig());
}
public JedisCluster(Set nodes, final GenericObjectPoolConfig poolConfig) {
this(nodes, DEFAULT_TIMEOUT, DEFAULT_MAX_ATTEMPTS, poolConfig);
}
public JedisCluster(Set nodes, int timeout,
final GenericObjectPoolConfig poolConfig) {
this(nodes, timeout, DEFAULT_MAX_ATTEMPTS, poolConfig);
}
public JedisCluster(Set jedisClusterNode, int timeout, int maxAttempts,
final GenericObjectPoolConfig poolConfig) {
super(jedisClusterNode, timeout, maxAttempts, poolConfig);
}
public JedisCluster(Set jedisClusterNode, int connectionTimeout, int soTimeout,
int maxAttempts, final GenericObjectPoolConfig poolConfig) {
super(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, poolConfig);
}
public JedisCluster(Set jedisClusterNode, int connectionTimeout, int soTimeout,
int maxAttempts, String password, final GenericObjectPoolConfig poolConfig) {
super(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, password, poolConfig);
}
public JedisCluster(Set jedisClusterNode, int connectionTimeout, int soTimeout,
int maxAttempts, String password, String clientName,
final GenericObjectPoolConfig poolConfig) {
super(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, password, clientName,
poolConfig);
}
public JedisCluster(Set jedisClusterNode, int connectionTimeout, int soTimeout,
int maxAttempts, String user, String password, String clientName,
final GenericObjectPoolConfig poolConfig) {
super(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, user, password, clientName,
poolConfig);
}
public JedisCluster(Set jedisClusterNode, int connectionTimeout, int soTimeout,
int infiniteSoTimeout, int maxAttempts, String user, String password, String clientName,
final GenericObjectPoolConfig poolConfig) {
super(jedisClusterNode, connectionTimeout, soTimeout, infiniteSoTimeout, maxAttempts, user,
password, clientName, poolConfig);
}
public JedisCluster(Set jedisClusterNode, int connectionTimeout, int soTimeout,
int maxAttempts, String password, String clientName,
final GenericObjectPoolConfig poolConfig, boolean ssl) {
super(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, password, clientName,
poolConfig, ssl);
}
public JedisCluster(Set jedisClusterNode, int connectionTimeout, int soTimeout,
int maxAttempts, String user, String password, String clientName,
final GenericObjectPoolConfig poolConfig, boolean ssl) {
super(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, user, password, clientName,
poolConfig, ssl);
}
/**
* @deprecated This constructor will be removed in next major release.
*/
@Deprecated
public JedisCluster(Set jedisClusterNode, int connectionTimeout, int soTimeout,
int maxAttempts, String password, String clientName,
final GenericObjectPoolConfig poolConfig, boolean ssl,
SSLSocketFactory sslSocketFactory, SSLParameters sslParameters,
HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap) {
super(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, password, clientName,
poolConfig, ssl, sslSocketFactory, sslParameters, hostnameVerifier, hostAndPortMap);
}
/**
* @deprecated This constructor will be removed in next major release.
*/
@Deprecated
public JedisCluster(Set jedisClusterNode, int connectionTimeout, int soTimeout,
int infiniteSoTimeout, int maxAttempts, String password, String clientName,
final GenericObjectPoolConfig poolConfig, boolean ssl,
SSLSocketFactory sslSocketFactory, SSLParameters sslParameters,
HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap) {
this(jedisClusterNode, connectionTimeout, soTimeout, infiniteSoTimeout, maxAttempts, null,
password, clientName, poolConfig, ssl, sslSocketFactory, sslParameters, hostnameVerifier,
hostAndPortMap);
}
/**
* @deprecated This constructor will be removed in next major release.
*/
@Deprecated
public JedisCluster(Set jedisClusterNode, int connectionTimeout, int soTimeout,
int maxAttempts, String user, String password, String clientName,
final GenericObjectPoolConfig poolConfig, boolean ssl,
SSLSocketFactory sslSocketFactory, SSLParameters sslParameters,
HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap) {
super(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, user, password, clientName,
poolConfig, ssl, sslSocketFactory, sslParameters, hostnameVerifier, hostAndPortMap);
}
/**
* @deprecated This constructor will be removed in next major release.
*/
@Deprecated
public JedisCluster(Set jedisClusterNode, int connectionTimeout, int soTimeout,
int infiniteSoTimeout, int maxAttempts, String user, String password, String clientName,
final GenericObjectPoolConfig poolConfig, boolean ssl,
SSLSocketFactory sslSocketFactory, SSLParameters sslParameters,
HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap) {
super(jedisClusterNode, connectionTimeout, soTimeout, infiniteSoTimeout, maxAttempts, user,
password, clientName, poolConfig, ssl, sslSocketFactory, sslParameters, hostnameVerifier,
hostAndPortMap);
}
/**
* @param maxTotalRetriesDuration After this amount of time we will do no more retries and report
* the operation as failed.
* @deprecated This constructor will be removed in next major release.
*/
@Deprecated
public JedisCluster(Set jedisClusterNode, int connectionTimeout, int soTimeout,
int infiniteSoTimeout, int maxAttempts, String user, String password, String clientName,
final GenericObjectPoolConfig poolConfig, boolean ssl,
SSLSocketFactory sslSocketFactory, SSLParameters sslParameters,
HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap,
Duration maxTotalRetriesDuration) {
super(jedisClusterNode, connectionTimeout, soTimeout, infiniteSoTimeout, maxAttempts, user,
password, clientName, poolConfig, ssl, sslSocketFactory, sslParameters, hostnameVerifier,
hostAndPortMap, maxTotalRetriesDuration);
}
public JedisCluster(Set nodes, final JedisClientConfig clientConfig,
int maxAttempts, final GenericObjectPoolConfig poolConfig) {
super(nodes, clientConfig, maxAttempts, poolConfig);
}
public JedisCluster(Set nodes, final JedisClientConfig clientConfig,
int maxAttempts, Duration maxTotalRetriesDuration,
final GenericObjectPoolConfig poolConfig) {
super(nodes, clientConfig, maxAttempts, maxTotalRetriesDuration, poolConfig);
}
@Override
public Boolean copy(String srcKey, String dstKey, boolean replace) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Boolean execute(Jedis connection) {
return connection.copy(srcKey, dstKey, replace);
}
}.run(2, srcKey, dstKey);
}
@Override
public String set(final String key, final String value) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.set(key, value);
}
}.run(key);
}
@Override
public String set(final String key, final String value, final SetParams params) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.set(key, value, params);
}
}.run(key);
}
@Override
public String get(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.get(key);
}
}.run(key);
}
@Override
public String getDel(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.getDel(key);
}
}.run(key);
}
@Override
public String getEx(String key, GetExParams params) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.getEx(key, params);
}
}.run(key);
}
@Override
public Boolean exists(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Boolean execute(Jedis connection) {
return connection.exists(key);
}
}.run(key);
}
@Override
public Long exists(final String... keys) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.exists(keys);
}
}.run(keys.length, keys);
}
@Override
public Long persist(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.persist(key);
}
}.run(key);
}
@Override
public String type(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.type(key);
}
}.run(key);
}
@Override
public byte[] dump(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public byte[] execute(Jedis connection) {
return connection.dump(key);
}
}.run(key);
}
@Override
public String restore(final String key, final long ttl, final byte[] serializedValue) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.restore(key, ttl, serializedValue);
}
}.run(key);
}
@Override
public String restore(final String key, final long ttl, final byte[] serializedValue,
final RestoreParams params) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.restore(key, ttl, serializedValue, params);
}
}.run(key);
}
@Override
public Long expire(final String key, final long seconds) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.expire(key, seconds);
}
}.run(key);
}
@Override
public Long pexpire(final String key, final long milliseconds) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.pexpire(key, milliseconds);
}
}.run(key);
}
@Override
public Long expireAt(final String key, final long unixTime) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.expireAt(key, unixTime);
}
}.run(key);
}
@Override
public Long pexpireAt(final String key, final long millisecondsTimestamp) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.pexpireAt(key, millisecondsTimestamp);
}
}.run(key);
}
@Override
public Long ttl(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.ttl(key);
}
}.run(key);
}
@Override
public Long pttl(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.pttl(key);
}
}.run(key);
}
@Override
public Long touch(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.touch(key);
}
}.run(key);
}
@Override
public Long touch(final String... keys) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.touch(keys);
}
}.run(keys.length, keys);
}
@Override
public Boolean setbit(final String key, final long offset, final boolean value) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Boolean execute(Jedis connection) {
return connection.setbit(key, offset, value);
}
}.run(key);
}
@Override
public Boolean setbit(final String key, final long offset, final String value) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Boolean execute(Jedis connection) {
return connection.setbit(key, offset, value);
}
}.run(key);
}
@Override
public Boolean getbit(final String key, final long offset) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Boolean execute(Jedis connection) {
return connection.getbit(key, offset);
}
}.run(key);
}
@Override
public Long setrange(final String key, final long offset, final String value) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.setrange(key, offset, value);
}
}.run(key);
}
@Override
public String getrange(final String key, final long startOffset, final long endOffset) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.getrange(key, startOffset, endOffset);
}
}.run(key);
}
@Override
public String getSet(final String key, final String value) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.getSet(key, value);
}
}.run(key);
}
@Override
public Long setnx(final String key, final String value) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.setnx(key, value);
}
}.run(key);
}
@Override
public String setex(final String key, final long seconds, final String value) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.setex(key, seconds, value);
}
}.run(key);
}
@Override
public String psetex(final String key, final long milliseconds, final String value) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.psetex(key, milliseconds, value);
}
}.run(key);
}
@Override
public Long decrBy(final String key, final long decrement) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.decrBy(key, decrement);
}
}.run(key);
}
@Override
public Long decr(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.decr(key);
}
}.run(key);
}
@Override
public Long incrBy(final String key, final long increment) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.incrBy(key, increment);
}
}.run(key);
}
@Override
public Double incrByFloat(final String key, final double increment) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Double execute(Jedis connection) {
return connection.incrByFloat(key, increment);
}
}.run(key);
}
@Override
public Long incr(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.incr(key);
}
}.run(key);
}
@Override
public Long append(final String key, final String value) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.append(key, value);
}
}.run(key);
}
@Override
public String substr(final String key, final int start, final int end) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.substr(key, start, end);
}
}.run(key);
}
@Override
public Long hset(final String key, final String field, final String value) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.hset(key, field, value);
}
}.run(key);
}
@Override
public Long hset(final String key, final Map hash) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.hset(key, hash);
}
}.run(key);
}
@Override
public String hget(final String key, final String field) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.hget(key, field);
}
}.run(key);
}
@Override
public Long hsetnx(final String key, final String field, final String value) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.hsetnx(key, field, value);
}
}.run(key);
}
@Override
public String hmset(final String key, final Map hash) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.hmset(key, hash);
}
}.run(key);
}
@Override
public List hmget(final String key, final String... fields) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public List execute(Jedis connection) {
return connection.hmget(key, fields);
}
}.run(key);
}
@Override
public Long hincrBy(final String key, final String field, final long value) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.hincrBy(key, field, value);
}
}.run(key);
}
@Override
public Double hincrByFloat(final String key, final String field, final double value) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Double execute(Jedis connection) {
return connection.hincrByFloat(key, field, value);
}
}.run(key);
}
@Override
public Boolean hexists(final String key, final String field) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Boolean execute(Jedis connection) {
return connection.hexists(key, field);
}
}.run(key);
}
@Override
public Long hdel(final String key, final String... field) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.hdel(key, field);
}
}.run(key);
}
@Override
public Long hlen(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.hlen(key);
}
}.run(key);
}
@Override
public Set hkeys(final String key) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.hkeys(key);
}
}.run(key);
}
@Override
public List hvals(final String key) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public List execute(Jedis connection) {
return connection.hvals(key);
}
}.run(key);
}
@Override
public Map hgetAll(final String key) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Map execute(Jedis connection) {
return connection.hgetAll(key);
}
}.run(key);
}
@Override
public String hrandfield(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.hrandfield(key);
}
}.run(key);
}
@Override
public List hrandfield(final String key, final long count) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public List execute(Jedis connection) {
return connection.hrandfield(key, count);
}
}.run(key);
}
@Override
public Map hrandfieldWithValues(final String key, final long count) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Map execute(Jedis connection) {
return connection.hrandfieldWithValues(key, count);
}
}.run(key);
}
@Override
public Long rpush(final String key, final String... string) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.rpush(key, string);
}
}.run(key);
}
@Override
public Long lpush(final String key, final String... string) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.lpush(key, string);
}
}.run(key);
}
@Override
public Long llen(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.llen(key);
}
}.run(key);
}
@Override
public List lrange(final String key, final long start, final long stop) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public List execute(Jedis connection) {
return connection.lrange(key, start, stop);
}
}.run(key);
}
@Override
public String ltrim(final String key, final long start, final long stop) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.ltrim(key, start, stop);
}
}.run(key);
}
@Override
public String lindex(final String key, final long index) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.lindex(key, index);
}
}.run(key);
}
@Override
public String lset(final String key, final long index, final String value) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.lset(key, index, value);
}
}.run(key);
}
@Override
public Long lrem(final String key, final long count, final String value) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.lrem(key, count, value);
}
}.run(key);
}
@Override
public String lpop(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.lpop(key);
}
}.run(key);
}
@Override
public List lpop(final String key, final int count) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public List execute(Jedis connection) {
return connection.lpop(key, count);
}
}.run(key);
}
@Override
public Long lpos(final String key, final String element) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.lpos(key, element);
}
}.run(key);
}
@Override
public Long lpos(final String key, final String element, final LPosParams params) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.lpos(key, element, params);
}
}.run(key);
}
@Override
public List lpos(final String key, final String element, final LPosParams params,
final long count) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public List execute(Jedis connection) {
return connection.lpos(key, element, params, count);
}
}.run(key);
}
@Override
public String rpop(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.rpop(key);
}
}.run(key);
}
@Override
public List rpop(final String key, final int count) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public List execute(Jedis connection) {
return connection.rpop(key, count);
}
}.run(key);
}
@Override
public Long sadd(final String key, final String... member) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.sadd(key, member);
}
}.run(key);
}
@Override
public Set smembers(final String key) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.smembers(key);
}
}.run(key);
}
@Override
public Long srem(final String key, final String... member) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.srem(key, member);
}
}.run(key);
}
@Override
public String spop(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.spop(key);
}
}.run(key);
}
@Override
public Set spop(final String key, final long count) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.spop(key, count);
}
}.run(key);
}
@Override
public Long scard(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.scard(key);
}
}.run(key);
}
@Override
public Boolean sismember(final String key, final String member) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Boolean execute(Jedis connection) {
return connection.sismember(key, member);
}
}.run(key);
}
@Override
public List smismember(final String key, final String... members) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public List execute(Jedis connection) {
return connection.smismember(key, members);
}
}.run(key);
}
@Override
public String srandmember(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.srandmember(key);
}
}.run(key);
}
@Override
public List srandmember(final String key, final int count) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public List execute(Jedis connection) {
return connection.srandmember(key, count);
}
}.run(key);
}
@Override
public Long strlen(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.strlen(key);
}
}.run(key);
}
@Override
public LCSMatchResult strAlgoLCSKeys(final String keyA, final String keyB, final StrAlgoLCSParams params) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public LCSMatchResult execute(Jedis connection) {
return connection.strAlgoLCSKeys(keyA, keyB, params);
}
}.run(2, keyA, keyB);
}
@Override
public LCSMatchResult strAlgoLCSStrings(final String strA, final String strB, final StrAlgoLCSParams params) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public LCSMatchResult execute(Jedis connection) {
return connection.strAlgoLCSStrings(strA, strB, params);
}
}.runWithAnyNode();
}
@Override
public Long zadd(final String key, final double score, final String member) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.zadd(key, score, member);
}
}.run(key);
}
@Override
public Long zadd(final String key, final double score, final String member,
final ZAddParams params) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.zadd(key, score, member, params);
}
}.run(key);
}
@Override
public Long zadd(final String key, final Map scoreMembers) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.zadd(key, scoreMembers);
}
}.run(key);
}
@Override
public Long zadd(final String key, final Map scoreMembers, final ZAddParams params) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.zadd(key, scoreMembers, params);
}
}.run(key);
}
@Override
public Double zaddIncr(String key, double score, String member, ZAddParams params) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Double execute(Jedis connection) {
return connection.zaddIncr(key, score, member, params);
}
}.run(key);
}
@Override
public Set zdiff(String... keys) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zdiff(keys);
}
}.run(keys.length, keys);
}
@Override
public Set zdiffWithScores(String... keys) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zdiffWithScores(keys);
}
}.run(keys.length, keys);
}
@Override
public Long zdiffStore(final String dstkey, final String... keys) {
String[] wholeKeys = KeyMergeUtil.merge(dstkey, keys);
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.zdiffStore(dstkey, keys);
}
}.run(wholeKeys.length, wholeKeys);
}
@Override
public Set zrange(final String key, final long start, final long stop) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zrange(key, start, stop);
}
}.run(key);
}
@Override
public Long zrem(final String key, final String... members) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.zrem(key, members);
}
}.run(key);
}
@Override
public Double zincrby(final String key, final double increment, final String member) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Double execute(Jedis connection) {
return connection.zincrby(key, increment, member);
}
}.run(key);
}
@Override
public Double zincrby(final String key, final double increment, final String member,
final ZIncrByParams params) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Double execute(Jedis connection) {
return connection.zincrby(key, increment, member, params);
}
}.run(key);
}
@Override
public Long zrank(final String key, final String member) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.zrank(key, member);
}
}.run(key);
}
@Override
public Long zrevrank(final String key, final String member) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.zrevrank(key, member);
}
}.run(key);
}
@Override
public Set zrevrange(final String key, final long start, final long stop) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zrevrange(key, start, stop);
}
}.run(key);
}
@Override
public Set zrangeWithScores(final String key, final long start, final long stop) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zrangeWithScores(key, start, stop);
}
}.run(key);
}
@Override
public Set zrevrangeWithScores(final String key, final long start, final long stop) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zrevrangeWithScores(key, start, stop);
}
}.run(key);
}
@Override
public String zrandmember(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public String execute(Jedis connection) {
return connection.zrandmember(key);
}
}.run(key);
}
@Override
public Set zrandmember(final String key, final long count) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zrandmember(key, count);
}
}.run(key);
}
@Override
public Set zrandmemberWithScores(final String key, final long count) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zrandmemberWithScores(key, count);
}
}.run(key);
}
@Override
public Long zcard(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.zcard(key);
}
}.run(key);
}
@Override
public Double zscore(final String key, final String member) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Double execute(Jedis connection) {
return connection.zscore(key, member);
}
}.run(key);
}
@Override
public List zmscore(final String key, final String... members) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public List execute(Jedis connection) {
return connection.zmscore(key, members);
}
}.run(key);
}
@Override
public Tuple zpopmax(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Tuple execute(Jedis connection) {
return connection.zpopmax(key);
}
}.run(key);
}
@Override
public Set zpopmax(final String key, final int count) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zpopmax(key, count);
}
}.run(key);
}
@Override
public Tuple zpopmin(final String key) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Tuple execute(Jedis connection) {
return connection.zpopmin(key);
}
}.run(key);
}
@Override
public Set zpopmin(final String key, final int count) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zpopmin(key, count);
}
}.run(key);
}
@Override
public List sort(final String key) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public List execute(Jedis connection) {
return connection.sort(key);
}
}.run(key);
}
@Override
public List sort(final String key, final SortingParams sortingParameters) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public List execute(Jedis connection) {
return connection.sort(key, sortingParameters);
}
}.run(key);
}
@Override
public Long zcount(final String key, final double min, final double max) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.zcount(key, min, max);
}
}.run(key);
}
@Override
public Long zcount(final String key, final String min, final String max) {
return new JedisClusterCommand(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Long execute(Jedis connection) {
return connection.zcount(key, min, max);
}
}.run(key);
}
@Override
public Set zrangeByScore(final String key, final double min, final double max) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zrangeByScore(key, min, max);
}
}.run(key);
}
@Override
public Set zrangeByScore(final String key, final String min, final String max) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zrangeByScore(key, min, max);
}
}.run(key);
}
@Override
public Set zrevrangeByScore(final String key, final double max, final double min) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zrevrangeByScore(key, max, min);
}
}.run(key);
}
@Override
public Set zrangeByScore(final String key, final double min, final double max,
final int offset, final int count) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zrangeByScore(key, min, max, offset, count);
}
}.run(key);
}
@Override
public Set zrevrangeByScore(final String key, final String max, final String min) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zrevrangeByScore(key, max, min);
}
}.run(key);
}
@Override
public Set zrangeByScore(final String key, final String min, final String max,
final int offset, final int count) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zrangeByScore(key, min, max, offset, count);
}
}.run(key);
}
@Override
public Set zrevrangeByScore(final String key, final double max, final double min,
final int offset, final int count) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zrevrangeByScore(key, max, min, offset, count);
}
}.run(key);
}
@Override
public Set zrangeByScoreWithScores(final String key, final double min, final double max) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zrangeByScoreWithScores(key, min, max);
}
}.run(key);
}
@Override
public Set zrevrangeByScoreWithScores(final String key, final double max, final double min) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zrevrangeByScoreWithScores(key, max, min);
}
}.run(key);
}
@Override
public Set zrangeByScoreWithScores(final String key, final double min, final double max,
final int offset, final int count) {
return new JedisClusterCommand>(connectionHandler, maxAttempts, maxTotalRetriesDuration) {
@Override
public Set execute(Jedis connection) {
return connection.zrangeByScoreWithScores(key, min, max, offset, count);
}
}.run(key);
}
@Override
public Set