Implemented SHUTDOWN

This commit is contained in:
Jonathan Leibiusky
2010-08-08 13:26:42 -03:00
parent bb5fe63b72
commit 5cc2d8874b
2 changed files with 15 additions and 0 deletions

View File

@@ -527,4 +527,8 @@ public class Client extends Connection {
public void lastsave() {
sendCommand("LASTSAVE");
}
public void shutdown() {
sendCommand("SHUTDOWN");
}
}

View File

@@ -622,4 +622,15 @@ public class Jedis {
client.lastsave();
return client.getIntegerReply();
}
public String shutdown() {
client.shutdown();
String status = null;
try {
status = client.getStatusCodeReply();
} catch (JedisException ex) {
status = null;
}
return status;
}
}