add variadic arguments support to lpush and rpush

This commit is contained in:
Shaofeng Niu
2012-02-14 17:42:06 +08:00
parent 72ca494362
commit f010bc0f32
10 changed files with 50 additions and 25 deletions

View File

@@ -180,12 +180,12 @@ public class BinaryShardedJedis extends Sharded<Jedis, JedisShardInfo>
return j.hgetAll(key);
}
public Long rpush(byte[] key, byte[] string) {
public Long rpush(byte[] key, byte[]... string) {
Jedis j = getShard(key);
return j.rpush(key, string);
}
public Long lpush(byte[] key, byte[] string) {
public Long lpush(byte[] key, byte[]... string) {
Jedis j = getShard(key);
return j.lpush(key, string);
}
@@ -407,4 +407,4 @@ public class BinaryShardedJedis extends Sharded<Jedis, JedisShardInfo>
pipeline.setShardedJedis(this);
return pipeline;
}
}
}