fixed up some missing pipelined methods
This commit is contained in:
@@ -85,6 +85,8 @@ public interface BinaryRedisPipeline {
|
||||
|
||||
Response<String> ltrim(byte[] key, long start, long end);
|
||||
|
||||
Response<Long> move(byte[] key, int dbIndex);
|
||||
|
||||
Response<Long> persist(byte[] key);
|
||||
|
||||
Response<byte[]> rpop(byte[] key);
|
||||
|
||||
@@ -30,10 +30,11 @@ public class BinaryShardedJedis extends Sharded<Jedis, JedisShardInfo>
|
||||
super(shards, algo, keyTagPattern);
|
||||
}
|
||||
|
||||
public void disconnect() throws IOException {
|
||||
for (Jedis jedis : getAllShards()) {
|
||||
jedis.disconnect();
|
||||
}
|
||||
public void disconnect() {
|
||||
for (Jedis jedis : getAllShards()) {
|
||||
jedis.quit();
|
||||
jedis.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
protected Jedis create(JedisShardInfo shard) {
|
||||
|
||||
@@ -60,4 +60,6 @@ public interface MultiKeyBinaryRedisPipeline {
|
||||
Response<byte[]> brpoplpush(byte[] source, byte[] destination, int timeout);
|
||||
|
||||
Response<Long> publish(byte[] channel, byte[] message);
|
||||
|
||||
Response<byte[]> randomKeyBinary();
|
||||
}
|
||||
|
||||
@@ -88,6 +88,8 @@ public interface RedisPipeline {
|
||||
|
||||
Response<String> ltrim(String key, long start, long end);
|
||||
|
||||
Response<Long> move(String key, int dbIndex);
|
||||
|
||||
Response<Long> persist(String key);
|
||||
|
||||
Response<String> rpop(String key);
|
||||
|
||||
@@ -26,13 +26,6 @@ public class ShardedJedis extends BinaryShardedJedis implements JedisCommands {
|
||||
super(shards, algo, keyTagPattern);
|
||||
}
|
||||
|
||||
public void disconnect() {
|
||||
for (Jedis jedis : getAllShards()) {
|
||||
jedis.quit();
|
||||
jedis.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
public String set(String key, String value) {
|
||||
Jedis j = getShard(key);
|
||||
return j.set(key, value);
|
||||
|
||||
@@ -91,6 +91,20 @@ public class ShardedJedisPipeline extends Queable implements BinaryRedisPipeline
|
||||
return getResponse(BuilderFactory.STRING_LIST);
|
||||
}
|
||||
|
||||
public Response<Long> move(byte[] key, int dbIndex) {
|
||||
Client c = getClient(key);
|
||||
c.move(key, dbIndex);
|
||||
results.add(new FutureResult(c));
|
||||
return getResponse(BuilderFactory.LONG);
|
||||
}
|
||||
|
||||
public Response<Long> move(String key, int dbIndex) {
|
||||
Client c = getClient(key);
|
||||
c.move(key, dbIndex);
|
||||
results.add(new FutureResult(c));
|
||||
return getResponse(BuilderFactory.LONG);
|
||||
}
|
||||
|
||||
public Response<byte[]> echo(byte[] string) {
|
||||
Client c = getClient(string);
|
||||
c.echo(string);
|
||||
|
||||
Reference in New Issue
Block a user