implemented bitcount and bitop commands for Redis 2.6

This commit is contained in:
MURAOKA Taro
2012-08-23 10:29:36 +09:00
parent b9442ea540
commit 4570329924
10 changed files with 167 additions and 4 deletions

View File

@@ -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);
}
}