diff --git a/src/main/java/redis/clients/jedis/Jedis.java b/src/main/java/redis/clients/jedis/Jedis.java index ec3929a230..6e06fef2af 100644 --- a/src/main/java/redis/clients/jedis/Jedis.java +++ b/src/main/java/redis/clients/jedis/Jedis.java @@ -3012,38 +3012,40 @@ public List> sentinelSlaves(String masterName) { return slaves; } - public String sentinelFailover(String masterName) { - client.sentinel(Protocol.SENTINEL_FAILOVER, masterName); - return client.getStatusCodeReply(); - } + public String sentinelFailover(String masterName) { + client.sentinel(Protocol.SENTINEL_FAILOVER, masterName); + return client.getStatusCodeReply(); + } - public String sentinelMonitor(String masterName, String ip, int port, - int quorum) { - client.sentinel(Protocol.SENTINEL_MONITOR, masterName, ip, String.valueOf(port), String.valueOf(quorum)); - return client.getStatusCodeReply(); - } + public String sentinelMonitor(String masterName, String ip, int port, + int quorum) { + client.sentinel(Protocol.SENTINEL_MONITOR, masterName, ip, + String.valueOf(port), String.valueOf(quorum)); + return client.getStatusCodeReply(); + } - public String sentinelRemove(String masterName) { - client.sentinel(Protocol.SENTINEL_REMOVE, masterName); - return client.getStatusCodeReply(); - } + public String sentinelRemove(String masterName) { + client.sentinel(Protocol.SENTINEL_REMOVE, masterName); + return client.getStatusCodeReply(); + } + + public String sentinelSet(String masterName, + Map parameterMap) { + int index = 0; + int paramsLength = parameterMap.size() * 2 + 2; + String[] params = new String[paramsLength]; - public String sentinelSet(String masterName, Map parameterMap) { - int index = 0; - int paramsLength = parameterMap.size() * 2 + 2; - String[] params = new String[paramsLength]; - - params[index++] = Protocol.SENTINEL_SET; - params[index++] = masterName; - for (Entry entry : parameterMap.entrySet()) { - params[index++] = entry.getKey(); - params[index++] = entry.getValue(); - } - - client.sentinel(params); - return client.getStatusCodeReply(); + params[index++] = Protocol.SENTINEL_SET; + params[index++] = masterName; + for (Entry entry : parameterMap.entrySet()) { + params[index++] = entry.getKey(); + params[index++] = entry.getValue(); } + client.sentinel(params); + return client.getStatusCodeReply(); + } + public byte[] dump(final String key) { checkIsInMulti(); client.dump(key); @@ -3280,8 +3282,8 @@ public Long pubsubNumPat() { public Map pubsubNumSub(String... channels) { checkIsInMulti(); - client.pubsubNumSub(channels); - return BuilderFactory.STRING_MAP - .build(client.getBinaryMultiBulkReply()); + client.pubsubNumSub(channels); + return BuilderFactory.STRING_MAP + .build(client.getBinaryMultiBulkReply()); } }