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

@@ -198,12 +198,12 @@ public class ShardedJedis extends BinaryShardedJedis implements JedisCommands {
return j.hgetAll(key);
}
public Long rpush(String key, String string) {
public Long rpush(String key, String... string) {
Jedis j = getShard(key);
return j.rpush(key, string);
}
public Long lpush(String key, String string) {
public Long lpush(String key, String... string) {
Jedis j = getShard(key);
return j.lpush(key, string);
}