extracted interfaces from Jedis

This commit is contained in:
samhendley
2012-12-24 11:41:53 -05:00
parent c0bda88e2c
commit 333ac221e1
5 changed files with 181 additions and 1 deletions

View File

@@ -43,6 +43,11 @@ public class ShardedJedis extends BinaryShardedJedis implements JedisCommands {
return j.get(key);
}
public String echo(String string) {
Jedis j = getShard(string);
return j.echo(string);
}
public Boolean exists(String key) {
Jedis j = getShard(key);
return j.exists(key);
@@ -103,6 +108,16 @@ public class ShardedJedis extends BinaryShardedJedis implements JedisCommands {
return j.setex(key, seconds, value);
}
public List<String> blpop(String arg) {
Jedis j = getShard(arg);
return j.blpop(arg);
}
public List<String> brpop(String arg) {
Jedis j = getShard(arg);
return j.brpop(arg);
}
public Long decrBy(String key, long integer) {
Jedis j = getShard(key);
return j.decrBy(key, integer);
@@ -218,6 +233,11 @@ public class ShardedJedis extends BinaryShardedJedis implements JedisCommands {
return j.strlen(key);
}
public Long move(String key, int dbIndex) {
Jedis j = getShard(key);
return j.move(key, dbIndex);
}
public Long rpushx(String key, String string) {
Jedis j = getShard(key);
return j.rpushx(key, string);