new - pexpire, pexpireat and pttl command

This commit is contained in:
mindwind
2013-06-29 15:13:21 +08:00
parent 8b3ea5f2de
commit e7a88a49e9
6 changed files with 130 additions and 32 deletions

View File

@@ -102,14 +102,6 @@ public class BinaryClient extends Connection {
public void del(final byte[]... keys) {
sendCommand(DEL, keys);
}
public void dump(final byte[] key) {
sendCommand(DUMP, key);
}
public void restore(final byte[] key, final int ttl, final byte[] serializedValue) {
sendCommand(RESTORE, key, toByteArray(ttl), serializedValue);
}
public void type(final byte[] key) {
sendCommand(TYPE, key);
@@ -870,6 +862,26 @@ public class BinaryClient extends Connection {
}
public void sentinel(final byte[]... args) {
sendCommand(SENTINEL, args);
sendCommand(SENTINEL, args);
}
public void dump(final byte[] key) {
sendCommand(DUMP, key);
}
public void restore(final byte[] key, final int ttl, final byte[] serializedValue) {
sendCommand(RESTORE, key, toByteArray(ttl), serializedValue);
}
public void pexpire(final byte[] key, final int milliseconds) {
sendCommand(PEXPIRE, key, toByteArray(milliseconds));
}
public void pexpireAt(final byte[] key, long millisecondsTimestamp) {
sendCommand(PEXPIREAT, key, toByteArray(millisecondsTimestamp));
}
public void pttl(final byte[] key) {
sendCommand(PTTL, key);
}
}