Implemented SHUTDOWN
This commit is contained in:
@@ -527,4 +527,8 @@ public class Client extends Connection {
|
|||||||
public void lastsave() {
|
public void lastsave() {
|
||||||
sendCommand("LASTSAVE");
|
sendCommand("LASTSAVE");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void shutdown() {
|
||||||
|
sendCommand("SHUTDOWN");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -622,4 +622,15 @@ public class Jedis {
|
|||||||
client.lastsave();
|
client.lastsave();
|
||||||
return client.getIntegerReply();
|
return client.getIntegerReply();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String shutdown() {
|
||||||
|
client.shutdown();
|
||||||
|
String status = null;
|
||||||
|
try {
|
||||||
|
status = client.getStatusCodeReply();
|
||||||
|
} catch (JedisException ex) {
|
||||||
|
status = null;
|
||||||
|
}
|
||||||
|
return status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user