Add CLUSTER ADDSLOTS and CLUSTER DELSLOTS commands

This commit is contained in:
Jonathan Leibiusky
2013-12-02 11:36:55 -05:00
parent 403f2b292c
commit dde278152f
4 changed files with 49 additions and 6 deletions

View File

@@ -3085,7 +3085,19 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
public String clusterMeet(final String ip, final int port) {
checkIsInMulti();
client.cluster(Protocol.CLUSTER_MEET, ip, port);
client.cluster(Protocol.CLUSTER_MEET, ip, String.valueOf(port));
return client.getStatusCodeReply();
}
public String clusterAddSlots(final int ...slots) {
checkIsInMulti();
client.cluster(Protocol.CLUSTER_ADDSLOTS, slots);
return client.getStatusCodeReply();
}
public String clusterDelSlots(final int ...slots) {
checkIsInMulti();
client.cluster(Protocol.CLUSTER_DELSLOTS, slots);
return client.getStatusCodeReply();
}
}