add bgrewriteaof
This commit is contained in:
@@ -2876,4 +2876,9 @@ public class BinaryJedis implements BinaryJedisCommands {
|
||||
public Client getClient() {
|
||||
return client;
|
||||
}
|
||||
|
||||
public String bgrewriteof() {
|
||||
client.bgrewriteaof();
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
}
|
||||
@@ -214,4 +214,5 @@ public interface Commands {
|
||||
public void linsert(final String key, final LIST_POSITION where,
|
||||
final String pivot, final String value);
|
||||
|
||||
public void bgrewriteaof();
|
||||
}
|
||||
@@ -2581,4 +2581,9 @@ public class Jedis extends BinaryJedis implements JedisCommands {
|
||||
client.linsert(key, where, pivot, value);
|
||||
return client.getIntegerReply();
|
||||
}
|
||||
|
||||
public String bgrewriteof() {
|
||||
client.bgrewriteaof();
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
}
|
||||
@@ -406,4 +406,8 @@ public class Pipeline implements Commands {
|
||||
public List<Object> execute() {
|
||||
return client.getAll();
|
||||
}
|
||||
|
||||
public void bgrewriteaof() {
|
||||
client.bgrewriteaof();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,5 +402,9 @@ public abstract class PipelineBlock implements Commands {
|
||||
client.zunionstore(dstkey, params, sets);
|
||||
}
|
||||
|
||||
public void bgrewriteaof() {
|
||||
client.bgrewriteaof();
|
||||
}
|
||||
|
||||
public abstract void execute();
|
||||
}
|
||||
|
||||
@@ -180,10 +180,11 @@ public class StringValuesCommandsTest extends JedisCommandTestBase {
|
||||
public void incrLargeNumbers() {
|
||||
long value = jedis.incr("foo");
|
||||
assertEquals(1, value);
|
||||
assertEquals(1L + Integer.MAX_VALUE, (long) jedis.incrBy("foo", Integer.MAX_VALUE));
|
||||
assertEquals(1L + Integer.MAX_VALUE, (long) jedis.incrBy("foo",
|
||||
Integer.MAX_VALUE));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test(expected = JedisException.class)
|
||||
public void incrReallyLargeNumbers() {
|
||||
jedis.set("foo", Long.toString(Long.MAX_VALUE));
|
||||
long value = jedis.incr("foo");
|
||||
|
||||
Reference in New Issue
Block a user