Add CLUSTER MEET command
This commit is contained in:
@@ -808,10 +808,10 @@ public class Client extends BinaryClient implements Commands {
|
||||
hincrByFloat(SafeEncoder.encode(key), SafeEncoder.encode(field), increment);
|
||||
}
|
||||
|
||||
public void cluster(final String... args) {
|
||||
public void cluster(final Object... args) {
|
||||
final byte[][] arg = new byte[args.length][];
|
||||
for (int i = 0; i < arg.length; i++) {
|
||||
arg[i] = SafeEncoder.encode(args[i]);
|
||||
arg[i] = SafeEncoder.encode(args[i].toString());
|
||||
}
|
||||
cluster(arg);
|
||||
}
|
||||
|
||||
@@ -3082,4 +3082,10 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
|
||||
client.cluster(Protocol.CLUSTER_NODES);
|
||||
return client.getBulkReply();
|
||||
}
|
||||
|
||||
public String clusterMeet(final String ip, final int port) {
|
||||
checkIsInMulti();
|
||||
client.cluster(Protocol.CLUSTER_MEET, ip, port);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ public final class Protocol {
|
||||
public static final String SENTINEL_SLAVES = "slaves";
|
||||
|
||||
public static final String CLUSTER_NODES = "nodes";
|
||||
public static final String CLUSTER_MEET = "meet";
|
||||
|
||||
private Protocol() {
|
||||
// this prevent the class from instantiation
|
||||
|
||||
Reference in New Issue
Block a user