Added bitcount to standard interfaces and bitop to MultiKey interfaces (since it is non-shardable)

Merge branch 'impl-bitcount-and-bitop' of git://github.com/koron/jedis

Conflicts:
	src/main/java/redis/clients/jedis/JedisCommands.java
This commit is contained in:
samhendley
2013-01-09 23:48:23 -05:00
21 changed files with 262 additions and 9 deletions

View File

@@ -814,8 +814,6 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
* <p>
* Time complexity: O(1)
*
* @see Jedis#lpush(String, String)
*
* @param key
* @param strings
* @return Integer reply, specifically, the number of elements inside the
@@ -835,8 +833,6 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
* <p>
* Time complexity: O(1)
*
* @see Jedis#rpush(String, String)
*
* @param key
* @param strings
* @return Integer reply, specifically, the number of elements inside the
@@ -2844,4 +2840,19 @@ public class Jedis extends BinaryJedis implements JedisCommands, MultiKeyCommand
client.objectIdletime(string);
return client.getIntegerReply();
}
public Long bitcount(final String key) {
client.bitcount(key);
return client.getIntegerReply();
}
public Long bitcount(final String key, long start, long end) {
client.bitcount(key, start, end);
return client.getIntegerReply();
}
public Long bitop(BitOP op, final String destKey, String... srcKeys) {
client.bitop(op, destKey, srcKeys);
return client.getIntegerReply();
}
}