Implemented BGREWRITEAOF
This commit is contained in:
@@ -519,4 +519,8 @@ public class Client extends Connection {
|
|||||||
public void bgsave() {
|
public void bgsave() {
|
||||||
sendCommand("BGSAVE");
|
sendCommand("BGSAVE");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void bgrewriteaof() {
|
||||||
|
sendCommand("BGREWRITEAOF");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -612,4 +612,9 @@ public class Jedis {
|
|||||||
client.bgsave();
|
client.bgsave();
|
||||||
return client.getStatusCodeReply();
|
return client.getStatusCodeReply();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String bgrewriteaof() {
|
||||||
|
client.bgrewriteaof();
|
||||||
|
return client.getStatusCodeReply();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -15,4 +15,10 @@ public class PersistenceControlCommandsTest extends JedisCommandTestBase {
|
|||||||
assertEquals("Background saving started", status);
|
assertEquals("Background saving started", status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void bgrewriteaof() {
|
||||||
|
String status = jedis.bgrewriteaof();
|
||||||
|
assertEquals("Background append only file rewriting started", status);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user