Fixing Jedis.(get|set)bit to use use booleans as input and output to better match Redis commands

This commit is contained in:
Eric Hauser
2011-02-22 22:15:08 -05:00
committed by Jonathan Leibiusky
parent dad1b8c394
commit ffebfe120b
4 changed files with 14 additions and 12 deletions

View File

@@ -403,14 +403,14 @@ public class Transaction extends BinaryTransaction {
return client.getStatusCodeReply();
}
public String setbit(String key, long offset, String value) {
public String setbit(String key, long offset, boolean value) {
client.setbit(key, offset, value);
return client.getStatusCodeReply();
}
public String getbit(String key, long offset) {
public boolean getbit(String key, long offset) {
client.getbit(key, offset);
return client.getStatusCodeReply();
return client.getStatusCodeReply() == "1";
}
public String linsert(final String key, final LIST_POSITION where,