add info optional parameter
This commit is contained in:
@@ -27,6 +27,8 @@ public interface BasicCommands {
|
|||||||
String shutdown();
|
String shutdown();
|
||||||
|
|
||||||
String info();
|
String info();
|
||||||
|
|
||||||
|
String info(String section);
|
||||||
|
|
||||||
String slaveof(String host, int port);
|
String slaveof(String host, int port);
|
||||||
|
|
||||||
|
|||||||
@@ -648,6 +648,10 @@ public class BinaryClient extends Connection {
|
|||||||
public void info() {
|
public void info() {
|
||||||
sendCommand(INFO);
|
sendCommand(INFO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void info(final String section) {
|
||||||
|
sendCommand(INFO, section);
|
||||||
|
}
|
||||||
|
|
||||||
public void monitor() {
|
public void monitor() {
|
||||||
sendCommand(MONITOR);
|
sendCommand(MONITOR);
|
||||||
|
|||||||
@@ -2825,6 +2825,11 @@ public class BinaryJedis implements BasicCommands, BinaryJedisCommands, MultiKey
|
|||||||
client.info();
|
client.info();
|
||||||
return client.getBulkReply();
|
return client.getBulkReply();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String info(final String section) {
|
||||||
|
client.info(section);
|
||||||
|
return client.getBulkReply();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dump all the received requests in real time.
|
* Dump all the received requests in real time.
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ public class ControlCommandsTest extends JedisCommandTestBase {
|
|||||||
public void info() {
|
public void info() {
|
||||||
String info = jedis.info();
|
String info = jedis.info();
|
||||||
assertNotNull(info);
|
assertNotNull(info);
|
||||||
|
info = jedis.info("server");
|
||||||
|
assertNotNull(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user