Add persist to ShardedJedis

This commit is contained in:
guycoleman
2012-12-03 15:36:30 +00:00
parent 2058231a61
commit 0340fddb3a
2 changed files with 17 additions and 8 deletions

View File

@@ -1,13 +1,13 @@
package redis.clients.jedis;
import redis.clients.jedis.BinaryClient.LIST_POSITION;
import redis.clients.util.Hashing;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.regex.Pattern;
import redis.clients.jedis.BinaryClient.LIST_POSITION;
import redis.clients.util.Hashing;
public class ShardedJedis extends BinaryShardedJedis implements JedisCommands {
public ShardedJedis(List<JedisShardInfo> shards) {
super(shards);
@@ -218,6 +218,11 @@ public class ShardedJedis extends BinaryShardedJedis implements JedisCommands {
return j.rpushx(key, string);
}
public Long persist(final String key) {
Jedis j = getShard(key);
return j.persist(key);
}
public Long llen(String key) {
Jedis j = getShard(key);
return j.llen(key);