Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add info optional parameter

  • Loading branch information...
commit 69f5340aa683a3d13aa2e8f9111cc560519c940c 1 parent 9d538a0
@xetorthio authored
View
2  src/main/java/redis/clients/jedis/BasicCommands.java
@@ -27,6 +27,8 @@
String shutdown();
String info();
+
+ String info(String section);
String slaveof(String host, int port);
View
4 src/main/java/redis/clients/jedis/BinaryClient.java
@@ -648,6 +648,10 @@ public void shutdown() {
public void info() {
sendCommand(INFO);
}
+
+ public void info(final String section) {
+ sendCommand(INFO, section);
+ }
public void monitor() {
sendCommand(MONITOR);
View
5 src/main/java/redis/clients/jedis/BinaryJedis.java
@@ -2825,6 +2825,11 @@ public String info() {
client.info();
return client.getBulkReply();
}
+
+ public String info(final String section) {
+ client.info(section);
+ return client.getBulkReply();
+ }
/**
* Dump all the received requests in real time.
View
2  src/test/java/redis/clients/jedis/tests/commands/ControlCommandsTest.java
@@ -58,6 +58,8 @@ public void lastsave() throws InterruptedException {
public void info() {
String info = jedis.info();
assertNotNull(info);
+ info = jedis.info("server");
+ assertNotNull(info);
}
@Test
Please sign in to comment.
Something went wrong with that request. Please try again.