Apply Sentinel runtime configuration API introduced on Redis 2.8.4

* Implements new sentinel commands (failover, monitor, remove, set) 
* unit test included
** added 2 redis-server and 1 sentinel for failover test
* with some refactoring
** SentinelCommands : refactor to have interface
** HostAndPortUtil : same format to cluster setup
This commit is contained in:
Jungtaek Lim
2014-01-22 00:23:40 +09:00
parent 01842e4731
commit a50cf3b15e
8 changed files with 244 additions and 65 deletions

View File

@@ -33,6 +33,10 @@ public final class Protocol {
public static final String SENTINEL_GET_MASTER_ADDR_BY_NAME = "get-master-addr-by-name";
public static final String SENTINEL_RESET = "reset";
public static final String SENTINEL_SLAVES = "slaves";
public static final String SENTINEL_FAILOVER = "failover";
public static final String SENTINEL_MONITOR = "monitor";
public static final String SENTINEL_REMOVE = "remove";
public static final String SENTINEL_SET = "set";
public static final String CLUSTER_NODES = "nodes";
public static final String CLUSTER_MEET = "meet";