getbit and setbit have now long offset
This commit is contained in:
@@ -637,11 +637,11 @@ public class BinaryClient extends Connection {
|
|||||||
sendCommand(CONFIG, Keyword.RESETSTAT.name());
|
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);
|
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));
|
sendCommand(GETBIT, key, toByteArray(offset));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -507,11 +507,11 @@ public class Client extends BinaryClient implements Commands {
|
|||||||
timeout);
|
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));
|
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);
|
getbit(SafeEncoder.encode(key), offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2604,7 +2604,7 @@ public class Jedis extends BinaryJedis implements JedisCommands {
|
|||||||
* @param value
|
* @param value
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Long setbit(String key, int offset, String value) {
|
public Long setbit(String key, long offset, String value) {
|
||||||
client.setbit(key, offset, value);
|
client.setbit(key, offset, value);
|
||||||
return client.getIntegerReply();
|
return client.getIntegerReply();
|
||||||
}
|
}
|
||||||
@@ -2616,7 +2616,7 @@ public class Jedis extends BinaryJedis implements JedisCommands {
|
|||||||
* @param offset
|
* @param offset
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Long getbit(String key, int offset) {
|
public Long getbit(String key, long offset) {
|
||||||
client.getbit(key, offset);
|
client.getbit(key, offset);
|
||||||
return client.getIntegerReply();
|
return client.getIntegerReply();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user