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:
22
src/main/java/redis/clients/jedis/SentinelCommands.java
Normal file
22
src/main/java/redis/clients/jedis/SentinelCommands.java
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user