implemented bitcount and bitop commands for Redis 2.6
This commit is contained in:
@@ -483,4 +483,19 @@ public class ShardedJedis extends BinaryShardedJedis implements JedisCommands {
|
||||
Jedis j = getShard(key);
|
||||
return j.linsert(key, where, pivot, value);
|
||||
}
|
||||
|
||||
public Long bitcount(final String key) {
|
||||
Jedis j = getShard(key);
|
||||
return j.bitcount(key);
|
||||
}
|
||||
|
||||
public Long bitcount(final String key, long start, long end) {
|
||||
Jedis j = getShard(key);
|
||||
return j.bitcount(key, start, end);
|
||||
}
|
||||
|
||||
public Long bitop(BitOP op, final String destKey, String... srcKeys) {
|
||||
Jedis j = getShard(destKey);
|
||||
return j.bitop(op, destKey, srcKeys);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user