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