diff --git a/lettuce/pom.xml b/lettuce/pom.xml
index 0a51aa8068..591b1f42a7 100644
--- a/lettuce/pom.xml
+++ b/lettuce/pom.xml
@@ -93,6 +93,13 @@
1.2.17
test
+
+ org.hamcrest
+ hamcrest-library
+ 1.3
+ test
+
+
diff --git a/lettuce/src/main/java/com/lambdaworks/redis/RedisAsyncConnectionImpl.java b/lettuce/src/main/java/com/lambdaworks/redis/RedisAsyncConnectionImpl.java
index c929ae7877..08c4e911a9 100644
--- a/lettuce/src/main/java/com/lambdaworks/redis/RedisAsyncConnectionImpl.java
+++ b/lettuce/src/main/java/com/lambdaworks/redis/RedisAsyncConnectionImpl.java
@@ -204,6 +204,11 @@ public void debugSegfault() {
dispatch(commandBuilder.debugSegfault());
}
+ @Override
+ public void debugOom() {
+ dispatch(commandBuilder.debugOom());
+ }
+
@Override
public RedisFuture decr(K key) {
return dispatch(commandBuilder.decr(key));
diff --git a/lettuce/src/main/java/com/lambdaworks/redis/RedisCommandBuilder.java b/lettuce/src/main/java/com/lambdaworks/redis/RedisCommandBuilder.java
index 9049b3d901..ad641d1d6a 100644
--- a/lettuce/src/main/java/com/lambdaworks/redis/RedisCommandBuilder.java
+++ b/lettuce/src/main/java/com/lambdaworks/redis/RedisCommandBuilder.java
@@ -167,6 +167,11 @@ public Command debugSegfault() {
return createCommand(DEBUG, null, args);
}
+ public Command debugOom() {
+ CommandArgs args = new CommandArgs(codec).add("OOM");
+ return createCommand(DEBUG, null, args);
+ }
+
public Command decr(K key) {
return createCommand(DECR, new IntegerOutput(codec), key);
}
diff --git a/lettuce/src/main/java/com/lambdaworks/redis/RedisSentinelAsyncConnection.java b/lettuce/src/main/java/com/lambdaworks/redis/RedisSentinelAsyncConnection.java
index 42b94f55f5..e942a47c37 100644
--- a/lettuce/src/main/java/com/lambdaworks/redis/RedisSentinelAsyncConnection.java
+++ b/lettuce/src/main/java/com/lambdaworks/redis/RedisSentinelAsyncConnection.java
@@ -2,6 +2,7 @@
import java.io.Closeable;
import java.net.SocketAddress;
+import java.util.List;
import java.util.Map;
import java.util.concurrent.Future;
@@ -23,6 +24,13 @@ public interface RedisSentinelAsyncConnection extends Closeable {
*/
Future getMasterAddrByName(K key);
+ /**
+ * Enumerates all the monitored masters and their states.
+ *
+ * @return RedisFuture<Map<K, V>>
+ */
+ RedisFuture>> masters();
+
/**
* Show the state and info of the specified master.
*
diff --git a/lettuce/src/main/java/com/lambdaworks/redis/RedisSentinelAsyncConnectionImpl.java b/lettuce/src/main/java/com/lambdaworks/redis/RedisSentinelAsyncConnectionImpl.java
index 91c5fac080..58039b1c77 100644
--- a/lettuce/src/main/java/com/lambdaworks/redis/RedisSentinelAsyncConnectionImpl.java
+++ b/lettuce/src/main/java/com/lambdaworks/redis/RedisSentinelAsyncConnectionImpl.java
@@ -52,6 +52,12 @@ public SocketAddress apply(List input) {
return result;
}
+ @Override
+ public RedisFuture>> masters() {
+
+ return dispatch(commandBuilder.masters());
+ }
+
@Override
public RedisFuture