Reformat all files in the project according to java conventions.
This commit is contained in:
@@ -13,10 +13,10 @@ import java.util.Set;
|
||||
import redis.clients.jedis.BinaryClient.LIST_POSITION;
|
||||
import redis.clients.util.SafeEncoder;
|
||||
import redis.clients.util.Slowlog;
|
||||
import java.net.URI;
|
||||
import java.util.*;
|
||||
|
||||
public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommands, AdvancedJedisCommands, ScriptingCommands, BasicCommands, ClusterCommands {
|
||||
public class Jedis extends BinaryJedis implements JedisCommands,
|
||||
MultiKeyCommands, AdvancedJedisCommands, ScriptingCommands,
|
||||
BasicCommands, ClusterCommands {
|
||||
public Jedis(final String host) {
|
||||
super(host);
|
||||
}
|
||||
@@ -56,24 +56,29 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
|
||||
/**
|
||||
* Set the string value as value of the key. The string can't be longer than
|
||||
* 1073741824 bytes (1 GB).
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
* @param nxxx NX|XX, NX -- Only set the key if it does not already exist.
|
||||
* XX -- Only set the key if it already exist.
|
||||
* @param expx EX|PX, expire time units: EX = seconds; PX = milliseconds
|
||||
* @param time expire time in the units of {@param #expx}
|
||||
* @param nxxx
|
||||
* NX|XX, NX -- Only set the key if it does not already exist. XX
|
||||
* -- Only set the key if it already exist.
|
||||
* @param expx
|
||||
* EX|PX, expire time units: EX = seconds; PX = milliseconds
|
||||
* @param time
|
||||
* expire time in the units of {@param #expx}
|
||||
* @return Status code reply
|
||||
*/
|
||||
public String set(final String key, final String value, final String nxxx, final String expx, final long time) {
|
||||
checkIsInMulti();
|
||||
client.set(key, value, nxxx, expx, time);
|
||||
return client.getStatusCodeReply();
|
||||
public String set(final String key, final String value, final String nxxx,
|
||||
final String expx, final long time) {
|
||||
checkIsInMulti();
|
||||
client.set(key, value, nxxx, expx, time);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of the specified key. If the key does not exist null
|
||||
* is returned. If the value stored at key is not a string an
|
||||
* error is returned because GET can only handle string values.
|
||||
* Get the value of the specified key. If the key does not exist null is
|
||||
* returned. If the value stored at key is not a string an error is returned
|
||||
* because GET can only handle string values.
|
||||
* <p>
|
||||
* Time complexity: O(1)
|
||||
*
|
||||
@@ -119,8 +124,8 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
|
||||
}
|
||||
|
||||
public Long del(String key) {
|
||||
client.del(key);
|
||||
return client.getIntegerReply();
|
||||
client.del(key);
|
||||
return client.getIntegerReply();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1381,7 +1386,7 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
|
||||
client.srandmember(key);
|
||||
return client.getBulkReply();
|
||||
}
|
||||
|
||||
|
||||
public List<String> srandmember(final String key, final int count) {
|
||||
checkIsInMulti();
|
||||
client.srandmember(key, count);
|
||||
@@ -1416,9 +1421,9 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
|
||||
}
|
||||
|
||||
public Long zadd(final String key, final Map<String, Double> scoreMembers) {
|
||||
checkIsInMulti();
|
||||
client.zadd(key, scoreMembers);
|
||||
return client.getIntegerReply();
|
||||
checkIsInMulti();
|
||||
client.zadd(key, scoreMembers);
|
||||
return client.getIntegerReply();
|
||||
}
|
||||
|
||||
public Set<String> zrange(final String key, final long start, final long end) {
|
||||
@@ -1789,39 +1794,39 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
|
||||
}
|
||||
|
||||
public List<String> blpop(String... args) {
|
||||
client.blpop(args);
|
||||
client.setTimeoutInfinite();
|
||||
final List<String> multiBulkReply = client.getMultiBulkReply();
|
||||
client.rollbackTimeout();
|
||||
return multiBulkReply;
|
||||
client.blpop(args);
|
||||
client.setTimeoutInfinite();
|
||||
final List<String> multiBulkReply = client.getMultiBulkReply();
|
||||
client.rollbackTimeout();
|
||||
return multiBulkReply;
|
||||
}
|
||||
|
||||
public List<String> brpop(String... args) {
|
||||
client.brpop(args);
|
||||
client.setTimeoutInfinite();
|
||||
final List<String> multiBulkReply = client.getMultiBulkReply();
|
||||
client.rollbackTimeout();
|
||||
return multiBulkReply;
|
||||
client.brpop(args);
|
||||
client.setTimeoutInfinite();
|
||||
final List<String> multiBulkReply = client.getMultiBulkReply();
|
||||
client.rollbackTimeout();
|
||||
return multiBulkReply;
|
||||
}
|
||||
|
||||
public List<String> blpop(String arg) {
|
||||
String[] args = new String[1];
|
||||
args[0] = arg;
|
||||
client.blpop(args);
|
||||
client.setTimeoutInfinite();
|
||||
final List<String> multiBulkReply = client.getMultiBulkReply();
|
||||
client.rollbackTimeout();
|
||||
return multiBulkReply;
|
||||
String[] args = new String[1];
|
||||
args[0] = arg;
|
||||
client.blpop(args);
|
||||
client.setTimeoutInfinite();
|
||||
final List<String> multiBulkReply = client.getMultiBulkReply();
|
||||
client.rollbackTimeout();
|
||||
return multiBulkReply;
|
||||
}
|
||||
|
||||
public List<String> brpop(String arg) {
|
||||
String[] args = new String[1];
|
||||
args[0] = arg;
|
||||
client.brpop(args);
|
||||
client.setTimeoutInfinite();
|
||||
final List<String> multiBulkReply = client.getMultiBulkReply();
|
||||
client.rollbackTimeout();
|
||||
return multiBulkReply;
|
||||
String[] args = new String[1];
|
||||
args[0] = arg;
|
||||
client.brpop(args);
|
||||
client.setTimeoutInfinite();
|
||||
final List<String> multiBulkReply = client.getMultiBulkReply();
|
||||
client.rollbackTimeout();
|
||||
return multiBulkReply;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1954,8 +1959,6 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
|
||||
return multiBulkReply;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Long zcount(final String key, final double min, final double max) {
|
||||
checkIsInMulti();
|
||||
client.zcount(key, min, max);
|
||||
@@ -2020,8 +2023,10 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
|
||||
* @see #zcount(String, double, double)
|
||||
*
|
||||
* @param key
|
||||
* @param min a double or Double.MIN_VALUE for "-inf"
|
||||
* @param max a double or Double.MAX_VALUE for "+inf"
|
||||
* @param min
|
||||
* a double or Double.MIN_VALUE for "-inf"
|
||||
* @param max
|
||||
* a double or Double.MAX_VALUE for "+inf"
|
||||
* @return Multi bulk reply specifically a list of elements in the specified
|
||||
* score range.
|
||||
*/
|
||||
@@ -2628,8 +2633,8 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
|
||||
}
|
||||
|
||||
public Boolean setbit(String key, long offset, String value) {
|
||||
client.setbit(key, offset, value);
|
||||
return client.getIntegerReply() == 1;
|
||||
client.setbit(key, offset, value);
|
||||
return client.getIntegerReply() == 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2742,26 +2747,26 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
|
||||
}
|
||||
|
||||
public void subscribe(final JedisPubSub jedisPubSub,
|
||||
final String... channels) {
|
||||
client.setTimeoutInfinite();
|
||||
jedisPubSub.proceed(client, channels);
|
||||
client.rollbackTimeout();
|
||||
final String... channels) {
|
||||
client.setTimeoutInfinite();
|
||||
jedisPubSub.proceed(client, channels);
|
||||
client.rollbackTimeout();
|
||||
}
|
||||
|
||||
public Long publish(final String channel, final String message) {
|
||||
checkIsInMulti();
|
||||
connect();
|
||||
client.publish(channel, message);
|
||||
return client.getIntegerReply();
|
||||
checkIsInMulti();
|
||||
connect();
|
||||
client.publish(channel, message);
|
||||
return client.getIntegerReply();
|
||||
}
|
||||
|
||||
public void psubscribe(final JedisPubSub jedisPubSub,
|
||||
final String... patterns) {
|
||||
checkIsInMulti();
|
||||
connect();
|
||||
client.setTimeoutInfinite();
|
||||
jedisPubSub.proceedWithPatterns(client, patterns);
|
||||
client.rollbackTimeout();
|
||||
final String... patterns) {
|
||||
checkIsInMulti();
|
||||
connect();
|
||||
client.setTimeoutInfinite();
|
||||
jedisPubSub.proceedWithPatterns(client, patterns);
|
||||
client.rollbackTimeout();
|
||||
}
|
||||
|
||||
protected static String[] getParams(List<String> keys, List<String> args) {
|
||||
@@ -2793,7 +2798,7 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
|
||||
|
||||
private Object getEvalResult() {
|
||||
Object result = client.getOne();
|
||||
|
||||
|
||||
if (result instanceof byte[])
|
||||
return SafeEncoder.encode((byte[]) result);
|
||||
|
||||
@@ -2870,18 +2875,18 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
|
||||
}
|
||||
|
||||
public Long bitcount(final String key) {
|
||||
client.bitcount(key);
|
||||
return client.getIntegerReply();
|
||||
client.bitcount(key);
|
||||
return client.getIntegerReply();
|
||||
}
|
||||
|
||||
public Long bitcount(final String key, long start, long end) {
|
||||
client.bitcount(key, start, end);
|
||||
return client.getIntegerReply();
|
||||
client.bitcount(key, start, end);
|
||||
return client.getIntegerReply();
|
||||
}
|
||||
|
||||
public Long bitop(BitOP op, final String destKey, String... srcKeys) {
|
||||
client.bitop(op, destKey, srcKeys);
|
||||
return client.getIntegerReply();
|
||||
client.bitop(op, destKey, srcKeys);
|
||||
return client.getIntegerReply();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2917,7 +2922,7 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public List<Map<String, String>> sentinelMasters() {
|
||||
public List<Map<String, String>> sentinelMasters() {
|
||||
client.sentinel(Protocol.SENTINEL_MASTERS);
|
||||
final List<Object> reply = client.getObjectMultiBulkReply();
|
||||
|
||||
@@ -2995,7 +3000,7 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public List<Map<String, String>> sentinelSlaves(String masterName) {
|
||||
public List<Map<String, String>> sentinelSlaves(String masterName) {
|
||||
client.sentinel(Protocol.SENTINEL_SLAVES, masterName);
|
||||
final List<Object> reply = client.getObjectMultiBulkReply();
|
||||
|
||||
@@ -3007,211 +3012,224 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
|
||||
}
|
||||
|
||||
public byte[] dump(final String key) {
|
||||
checkIsInMulti();
|
||||
client.dump(key);
|
||||
return client.getBinaryBulkReply();
|
||||
checkIsInMulti();
|
||||
client.dump(key);
|
||||
return client.getBinaryBulkReply();
|
||||
}
|
||||
|
||||
public String restore(final String key, final int ttl, final byte[] serializedValue) {
|
||||
checkIsInMulti();
|
||||
client.restore(key, ttl, serializedValue);
|
||||
return client.getStatusCodeReply();
|
||||
|
||||
public String restore(final String key, final int ttl,
|
||||
final byte[] serializedValue) {
|
||||
checkIsInMulti();
|
||||
client.restore(key, ttl, serializedValue);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
|
||||
public Long pexpire(final String key, final int milliseconds) {
|
||||
checkIsInMulti();
|
||||
client.pexpire(key, milliseconds);
|
||||
return client.getIntegerReply();
|
||||
checkIsInMulti();
|
||||
client.pexpire(key, milliseconds);
|
||||
return client.getIntegerReply();
|
||||
}
|
||||
|
||||
|
||||
public Long pexpireAt(final String key, final long millisecondsTimestamp) {
|
||||
checkIsInMulti();
|
||||
client.pexpireAt(key, millisecondsTimestamp);
|
||||
return client.getIntegerReply();
|
||||
checkIsInMulti();
|
||||
client.pexpireAt(key, millisecondsTimestamp);
|
||||
return client.getIntegerReply();
|
||||
}
|
||||
|
||||
|
||||
public Long pttl(final String key) {
|
||||
checkIsInMulti();
|
||||
client.pttl(key);
|
||||
return client.getIntegerReply();
|
||||
checkIsInMulti();
|
||||
client.pttl(key);
|
||||
return client.getIntegerReply();
|
||||
}
|
||||
|
||||
|
||||
public Double incrByFloat(final String key, final double increment) {
|
||||
checkIsInMulti();
|
||||
client.incrByFloat(key, increment);
|
||||
String relpy = client.getBulkReply();
|
||||
return (relpy != null ? new Double(relpy) : null);
|
||||
checkIsInMulti();
|
||||
client.incrByFloat(key, increment);
|
||||
String relpy = client.getBulkReply();
|
||||
return (relpy != null ? new Double(relpy) : null);
|
||||
}
|
||||
|
||||
public String psetex(final String key, final int milliseconds, final String value) {
|
||||
checkIsInMulti();
|
||||
client.psetex(key, milliseconds, value);
|
||||
return client.getStatusCodeReply();
|
||||
|
||||
public String psetex(final String key, final int milliseconds,
|
||||
final String value) {
|
||||
checkIsInMulti();
|
||||
client.psetex(key, milliseconds, value);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
|
||||
public String set(final String key, final String value, final String nxxx) {
|
||||
checkIsInMulti();
|
||||
client.set(key, value, nxxx);
|
||||
return client.getStatusCodeReply();
|
||||
checkIsInMulti();
|
||||
client.set(key, value, nxxx);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
public String set(final String key, final String value, final String nxxx, final String expx, final int time) {
|
||||
checkIsInMulti();
|
||||
client.set(key, value, nxxx, expx, time);
|
||||
return client.getStatusCodeReply();
|
||||
|
||||
public String set(final String key, final String value, final String nxxx,
|
||||
final String expx, final int time) {
|
||||
checkIsInMulti();
|
||||
client.set(key, value, nxxx, expx, time);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
|
||||
public String clientKill(final String client) {
|
||||
checkIsInMulti();
|
||||
this.client.clientKill(client);
|
||||
return this.client.getStatusCodeReply();
|
||||
checkIsInMulti();
|
||||
this.client.clientKill(client);
|
||||
return this.client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
|
||||
public String clientSetname(final String name) {
|
||||
checkIsInMulti();
|
||||
client.clientSetname(name);
|
||||
return client.getStatusCodeReply();
|
||||
checkIsInMulti();
|
||||
client.clientSetname(name);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
public String migrate(final String host, final int port, final String key, final int destinationDb, final int timeout) {
|
||||
checkIsInMulti();
|
||||
client.migrate(host, port, key, destinationDb, timeout);
|
||||
return client.getStatusCodeReply();
|
||||
|
||||
public String migrate(final String host, final int port, final String key,
|
||||
final int destinationDb, final int timeout) {
|
||||
checkIsInMulti();
|
||||
client.migrate(host, port, key, destinationDb, timeout);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
public Double hincrByFloat(final String key, final String field, double increment) {
|
||||
checkIsInMulti();
|
||||
client.hincrByFloat(key, field, increment);
|
||||
String relpy = client.getBulkReply();
|
||||
return (relpy != null ? new Double(relpy) : null);
|
||||
|
||||
public Double hincrByFloat(final String key, final String field,
|
||||
double increment) {
|
||||
checkIsInMulti();
|
||||
client.hincrByFloat(key, field, increment);
|
||||
String relpy = client.getBulkReply();
|
||||
return (relpy != null ? new Double(relpy) : null);
|
||||
}
|
||||
|
||||
public ScanResult<String> scan(int cursor) {
|
||||
return scan(cursor, new ScanParams());
|
||||
}
|
||||
|
||||
|
||||
public ScanResult<String> scan(int cursor, final ScanParams params) {
|
||||
checkIsInMulti();
|
||||
client.scan(cursor, params);
|
||||
List<Object> result = client.getObjectMultiBulkReply();
|
||||
int newcursor = Integer.parseInt(new String((byte[])result.get(0)));
|
||||
int newcursor = Integer.parseInt(new String((byte[]) result.get(0)));
|
||||
List<String> results = new ArrayList<String>();
|
||||
List<byte[]> rawResults = (List<byte[]>)result.get(1);
|
||||
List<byte[]> rawResults = (List<byte[]>) result.get(1);
|
||||
for (byte[] bs : rawResults) {
|
||||
results.add(SafeEncoder.encode(bs));
|
||||
}
|
||||
return new ScanResult<String>(newcursor, results);
|
||||
}
|
||||
|
||||
public ScanResult<Map.Entry<String, String>> hscan(final String key, int cursor) {
|
||||
|
||||
public ScanResult<Map.Entry<String, String>> hscan(final String key,
|
||||
int cursor) {
|
||||
return hscan(key, cursor, new ScanParams());
|
||||
}
|
||||
|
||||
public ScanResult<Map.Entry<String, String>> hscan(final String key, int cursor, final ScanParams params) {
|
||||
|
||||
public ScanResult<Map.Entry<String, String>> hscan(final String key,
|
||||
int cursor, final ScanParams params) {
|
||||
checkIsInMulti();
|
||||
client.hscan(key, cursor, params);
|
||||
List<Object> result = client.getObjectMultiBulkReply();
|
||||
int newcursor = Integer.parseInt(new String((byte[])result.get(0)));
|
||||
int newcursor = Integer.parseInt(new String((byte[]) result.get(0)));
|
||||
List<Map.Entry<String, String>> results = new ArrayList<Map.Entry<String, String>>();
|
||||
List<byte[]> rawResults = (List<byte[]>)result.get(1);
|
||||
List<byte[]> rawResults = (List<byte[]>) result.get(1);
|
||||
Iterator<byte[]> iterator = rawResults.iterator();
|
||||
while(iterator.hasNext()) {
|
||||
results.add(new AbstractMap.SimpleEntry<String, String>(SafeEncoder.encode(iterator.next()), SafeEncoder.encode(iterator.next())));
|
||||
while (iterator.hasNext()) {
|
||||
results.add(new AbstractMap.SimpleEntry<String, String>(SafeEncoder
|
||||
.encode(iterator.next()), SafeEncoder.encode(iterator
|
||||
.next())));
|
||||
}
|
||||
return new ScanResult<Map.Entry<String, String>>(newcursor, results);
|
||||
}
|
||||
|
||||
|
||||
public ScanResult<String> sscan(final String key, int cursor) {
|
||||
return sscan(key, cursor, new ScanParams());
|
||||
}
|
||||
|
||||
public ScanResult<String> sscan(final String key, int cursor, final ScanParams params) {
|
||||
|
||||
public ScanResult<String> sscan(final String key, int cursor,
|
||||
final ScanParams params) {
|
||||
checkIsInMulti();
|
||||
client.sscan(key, cursor, params);
|
||||
List<Object> result = client.getObjectMultiBulkReply();
|
||||
int newcursor = Integer.parseInt(new String((byte[])result.get(0)));
|
||||
int newcursor = Integer.parseInt(new String((byte[]) result.get(0)));
|
||||
List<String> results = new ArrayList<String>();
|
||||
List<byte[]> rawResults = (List<byte[]>)result.get(1);
|
||||
List<byte[]> rawResults = (List<byte[]>) result.get(1);
|
||||
for (byte[] bs : rawResults) {
|
||||
results.add(SafeEncoder.encode(bs));
|
||||
}
|
||||
return new ScanResult<String>(newcursor, results);
|
||||
}
|
||||
|
||||
|
||||
public ScanResult<Tuple> zscan(final String key, int cursor) {
|
||||
return zscan(key, cursor, new ScanParams());
|
||||
}
|
||||
|
||||
public ScanResult<Tuple> zscan(final String key, int cursor, final ScanParams params) {
|
||||
|
||||
public ScanResult<Tuple> zscan(final String key, int cursor,
|
||||
final ScanParams params) {
|
||||
checkIsInMulti();
|
||||
client.zscan(key, cursor, params);
|
||||
List<Object> result = client.getObjectMultiBulkReply();
|
||||
int newcursor = Integer.parseInt(new String((byte[])result.get(0)));
|
||||
int newcursor = Integer.parseInt(new String((byte[]) result.get(0)));
|
||||
List<Tuple> results = new ArrayList<Tuple>();
|
||||
List<byte[]> rawResults = (List<byte[]>)result.get(1);
|
||||
List<byte[]> rawResults = (List<byte[]>) result.get(1);
|
||||
Iterator<byte[]> iterator = rawResults.iterator();
|
||||
while(iterator.hasNext()) {
|
||||
results.add(new Tuple(SafeEncoder.encode(iterator.next()), Double.valueOf(SafeEncoder.encode(iterator.next()))));
|
||||
while (iterator.hasNext()) {
|
||||
results.add(new Tuple(SafeEncoder.encode(iterator.next()), Double
|
||||
.valueOf(SafeEncoder.encode(iterator.next()))));
|
||||
}
|
||||
return new ScanResult<Tuple>(newcursor, results);
|
||||
}
|
||||
|
||||
public String clusterNodes() {
|
||||
checkIsInMulti();
|
||||
client.clusterNodes();
|
||||
return client.getBulkReply();
|
||||
}
|
||||
|
||||
public String clusterMeet(final String ip, final int port) {
|
||||
checkIsInMulti();
|
||||
client.clusterMeet(ip, port);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
public String clusterAddSlots(final int ...slots) {
|
||||
checkIsInMulti();
|
||||
client.clusterAddSlots(slots);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
public String clusterDelSlots(final int ...slots) {
|
||||
checkIsInMulti();
|
||||
client.clusterDelSlots(slots);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
public String clusterInfo() {
|
||||
checkIsInMulti();
|
||||
client.clusterInfo();
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
public List<String> clusterGetKeysInSlot(final int slot, final int count) {
|
||||
checkIsInMulti();
|
||||
client.clusterGetKeysInSlot(slot, count);
|
||||
return client.getMultiBulkReply();
|
||||
}
|
||||
|
||||
public String clusterSetSlotNode(final int slot, final String nodeId) {
|
||||
checkIsInMulti();
|
||||
client.clusterSetSlotNode(slot, nodeId);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
public String clusterSetSlotMigrating(final int slot, final String nodeId) {
|
||||
checkIsInMulti();
|
||||
client.clusterSetSlotMigrating(slot, nodeId);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
public String clusterSetSlotImporting(final int slot, final String nodeId) {
|
||||
checkIsInMulti();
|
||||
client.clusterSetSlotImporting(slot, nodeId);
|
||||
return client.getStatusCodeReply();
|
||||
checkIsInMulti();
|
||||
client.clusterNodes();
|
||||
return client.getBulkReply();
|
||||
}
|
||||
|
||||
public String asking() {
|
||||
checkIsInMulti();
|
||||
client.asking();
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
public String clusterMeet(final String ip, final int port) {
|
||||
checkIsInMulti();
|
||||
client.clusterMeet(ip, port);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
public String clusterAddSlots(final int... slots) {
|
||||
checkIsInMulti();
|
||||
client.clusterAddSlots(slots);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
public String clusterDelSlots(final int... slots) {
|
||||
checkIsInMulti();
|
||||
client.clusterDelSlots(slots);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
public String clusterInfo() {
|
||||
checkIsInMulti();
|
||||
client.clusterInfo();
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
public List<String> clusterGetKeysInSlot(final int slot, final int count) {
|
||||
checkIsInMulti();
|
||||
client.clusterGetKeysInSlot(slot, count);
|
||||
return client.getMultiBulkReply();
|
||||
}
|
||||
|
||||
public String clusterSetSlotNode(final int slot, final String nodeId) {
|
||||
checkIsInMulti();
|
||||
client.clusterSetSlotNode(slot, nodeId);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
public String clusterSetSlotMigrating(final int slot, final String nodeId) {
|
||||
checkIsInMulti();
|
||||
client.clusterSetSlotMigrating(slot, nodeId);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
public String clusterSetSlotImporting(final int slot, final String nodeId) {
|
||||
checkIsInMulti();
|
||||
client.clusterSetSlotImporting(slot, nodeId);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
public String asking() {
|
||||
checkIsInMulti();
|
||||
client.asking();
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user