Add strlen to ShardedJedis
This commit is contained in:
@@ -195,6 +195,11 @@ public class BinaryShardedJedis extends Sharded<Jedis, JedisShardInfo>
|
||||
return j.lpush(key, strings);
|
||||
}
|
||||
|
||||
public Long strlen(final byte[] key) {
|
||||
Jedis j = getShard(key);
|
||||
return j.strlen(key);
|
||||
}
|
||||
|
||||
public Long lpushx(byte[] key, byte[] string) {
|
||||
Jedis j = getShard(key);
|
||||
return j.lpushx(key, string);
|
||||
|
||||
@@ -213,6 +213,11 @@ public class ShardedJedis extends BinaryShardedJedis implements JedisCommands {
|
||||
return j.lpushx(key, string);
|
||||
}
|
||||
|
||||
public Long strlen(final String key) {
|
||||
Jedis j = getShard(key);
|
||||
return j.strlen(key);
|
||||
}
|
||||
|
||||
public Long rpushx(String key, String string) {
|
||||
Jedis j = getShard(key);
|
||||
return j.rpushx(key, string);
|
||||
|
||||
Reference in New Issue
Block a user