getbit and setbit have now long offset

This commit is contained in:
Jonathan Leibiusky
2011-01-20 11:50:38 -03:00
parent a13aff5421
commit 1857dd3413
3 changed files with 6 additions and 6 deletions

View File

@@ -637,11 +637,11 @@ public class BinaryClient extends Connection {
sendCommand(CONFIG, Keyword.RESETSTAT.name());
}
public void setbit(byte[] key, int offset, byte[] value) {
public void setbit(byte[] key, long offset, byte[] value) {
sendCommand(SETBIT, key, toByteArray(offset), value);
}
public void getbit(byte[] key, int offset) {
public void getbit(byte[] key, long offset) {
sendCommand(GETBIT, key, toByteArray(offset));
}
}

View File

@@ -507,11 +507,11 @@ public class Client extends BinaryClient implements Commands {
timeout);
}
public void setbit(final String key, final int offset, final String value) {
public void setbit(final String key, final long offset, final String value) {
setbit(SafeEncoder.encode(key), offset, SafeEncoder.encode(value));
}
public void getbit(String key, int offset) {
public void getbit(String key, long offset) {
getbit(SafeEncoder.encode(key), offset);
}
}

View File

@@ -2604,7 +2604,7 @@ public class Jedis extends BinaryJedis implements JedisCommands {
* @param value
* @return
*/
public Long setbit(String key, int offset, String value) {
public Long setbit(String key, long offset, String value) {
client.setbit(key, offset, value);
return client.getIntegerReply();
}
@@ -2616,7 +2616,7 @@ public class Jedis extends BinaryJedis implements JedisCommands {
* @param offset
* @return
*/
public Long getbit(String key, int offset) {
public Long getbit(String key, long offset) {
client.getbit(key, offset);
return client.getIntegerReply();
}