Add support for cluster reset command. Some tests were refactored per the inclusion of the new command

This commit is contained in:
Marcos Nils
2014-09-14 15:43:18 -03:00
parent 56d1798943
commit 687716902d
7 changed files with 48 additions and 24 deletions

View File

@@ -8,6 +8,7 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import redis.clients.jedis.JedisCluster.Reset;
import redis.clients.util.SafeEncoder;
public class Client extends BinaryClient implements Commands {
@@ -911,6 +912,10 @@ public class Client extends BinaryClient implements Commands {
cluster(Protocol.CLUSTER_MEET, ip, String.valueOf(port));
}
public void clusterReset(Reset resetType) {
cluster(Protocol.CLUSTER_RESET, resetType.toString());
}
public void clusterAddSlots(final int... slots) {
cluster(Protocol.CLUSTER_ADDSLOTS, slots);
}