add bitset and bitget

This commit is contained in:
Jonathan Leibiusky
2010-12-20 16:26:52 -03:00
parent 586cc9f6d9
commit 0d296a7f1a
6 changed files with 86 additions and 1 deletions

View File

@@ -2595,4 +2595,29 @@ public class Jedis extends BinaryJedis implements JedisCommands {
client.brpoplpush(source, destination, timeout);
return client.getBulkReply();
}
/**
* Sets or clears the bit at offset in the string value stored at key
*
* @param key
* @param offset
* @param value
* @return
*/
public Long setbit(String key, int offset, String value) {
client.setbit(key, offset, value);
return client.getIntegerReply();
}
/**
* Returns the bit value at offset in the string value stored at key
*
* @param key
* @param offset
* @return
*/
public Long getbit(String key, int offset) {
client.getbit(key, offset);
return client.getIntegerReply();
}
}