Impmented SAVE command
This commit is contained in:
@@ -511,4 +511,8 @@ public class Client extends Connection {
|
||||
args.addAll(params.getParams());
|
||||
sendCommand("ZINTERSTORE", args.toArray(new String[args.size()]));
|
||||
}
|
||||
|
||||
public void save() {
|
||||
sendCommand("SAVE");
|
||||
}
|
||||
}
|
||||
@@ -602,4 +602,9 @@ public class Jedis {
|
||||
client.zinterstore(dstkey, params, sets);
|
||||
return client.getIntegerReply();
|
||||
}
|
||||
|
||||
public String save() {
|
||||
client.save();
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package redis.clients.jedis.tests.commands;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class PersistenceControlCommandsTest extends JedisCommandTestBase {
|
||||
@Test
|
||||
public void save() {
|
||||
String status = jedis.save();
|
||||
assertEquals("OK", status);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user