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

@@ -0,0 +1,22 @@
package redis.clients.jedis;
import java.util.List;
import java.util.Map;
public interface SentinelCommands {
public List<Map<String, String>> sentinelMasters();
public List<String> sentinelGetMasterAddrByName(String masterName);
public Long sentinelReset(String pattern);
public List<Map<String, String>> sentinelSlaves(String masterName);
public String sentinelFailover(String masterName);
public String sentinelMonitor(String masterName, String ip, int port, int quorum);
public String sentinelRemove(String masterName);
public String sentinelSet(String masterName, Map<String, String> parameterMap);
}