diff --git a/pom.xml b/pom.xml
index 1f0d73253d..b063505409 100644
--- a/pom.xml
+++ b/pom.xml
@@ -129,8 +129,8 @@
maven-compiler-plugin
3.8.1
- 1.7
- 1.7
+ 1.8
+ 1.8
diff --git a/src/main/java/redis/clients/jedis/BinaryClient.java b/src/main/java/redis/clients/jedis/BinaryClient.java
index 7c2b99c82e..8487c05a7f 100644
--- a/src/main/java/redis/clients/jedis/BinaryClient.java
+++ b/src/main/java/redis/clients/jedis/BinaryClient.java
@@ -193,10 +193,18 @@ public void dbSize() {
sendCommand(DBSIZE);
}
+ /**
+ * @deprecated Use {@link #expire(byte[], long)}.
+ */
+ @Deprecated
public void expire(final byte[] key, final int seconds) {
sendCommand(EXPIRE, key, toByteArray(seconds));
}
+ public void expire(final byte[] key, final long seconds) {
+ sendCommand(EXPIRE, key, toByteArray(seconds));
+ }
+
public void expireAt(final byte[] key, final long unixTime) {
sendCommand(EXPIREAT, key, toByteArray(unixTime));
}
@@ -237,10 +245,18 @@ public void setnx(final byte[] key, final byte[] value) {
sendCommand(SETNX, key, value);
}
+ /**
+ * @deprecated Use {@link #setex(byte[], long, byte[])}.
+ */
+ @Deprecated
public void setex(final byte[] key, final int seconds, final byte[] value) {
sendCommand(SETEX, key, toByteArray(seconds), value);
}
+ public void setex(final byte[] key, final long seconds, final byte[] value) {
+ sendCommand(SETEX, key, toByteArray(seconds), value);
+ }
+
public void mset(final byte[]... keysvalues) {
sendCommand(MSET, keysvalues);
}
@@ -1068,14 +1084,30 @@ public void dump(final byte[] key) {
sendCommand(DUMP, key);
}
+ /**
+ * @deprecated Use {@link #restore(byte[], long, byte[])}.
+ */
+ @Deprecated
public void restore(final byte[] key, final int ttl, final byte[] serializedValue) {
sendCommand(RESTORE, key, toByteArray(ttl), serializedValue);
}
+ public void restore(final byte[] key, final long ttl, final byte[] serializedValue) {
+ sendCommand(RESTORE, key, toByteArray(ttl), serializedValue);
+ }
+
+ /**
+ * @deprecated Use {@link #restoreReplace(byte[], long, byte[])}.
+ */
+ @Deprecated
public void restoreReplace(final byte[] key, final int ttl, final byte[] serializedValue) {
sendCommand(RESTORE, key, toByteArray(ttl), serializedValue, Keyword.REPLACE.getRaw());
}
+ public void restoreReplace(final byte[] key, final long ttl, final byte[] serializedValue) {
+ sendCommand(RESTORE, key, toByteArray(ttl), serializedValue, Keyword.REPLACE.getRaw());
+ }
+
public void pexpire(final byte[] key, final long milliseconds) {
sendCommand(PEXPIRE, key, toByteArray(milliseconds));
}
@@ -1441,11 +1473,19 @@ public void xadd(final byte[] key, final byte[] id, final Map ha
public void xlen(final byte[] key) {
sendCommand(XLEN, key);
}
-
- public void xrange(final byte[] key, final byte[] start, final byte[] end, final long count) {
- sendCommand(XRANGE, key, start, end, Keyword.COUNT.getRaw(), toByteArray(count));
+
+ /**
+ * @deprecated Use {@link #xrange(byte[], byte[], byte[], int)}.
+ */
+ @Deprecated
+ public void xrange(final byte[] key, final byte[] start, final byte[] end, final long count) {
+ sendCommand(XRANGE, key, start, end, Keyword.COUNT.getRaw(), toByteArray(count));
}
-
+
+ public void xrange(final byte[] key, final byte[] start, final byte[] end, final int count) {
+ sendCommand(XRANGE, key, start, end, Keyword.COUNT.getRaw(), toByteArray(count));
+ }
+
public void xrevrange(final byte[] key, final byte[] end, final byte[] start, final int count) {
sendCommand(XREVRANGE, key, end, start, Keyword.COUNT.getRaw(), toByteArray(count));
}
diff --git a/src/main/java/redis/clients/jedis/BinaryJedis.java b/src/main/java/redis/clients/jedis/BinaryJedis.java
index 1e5427ccb0..28197129cb 100644
--- a/src/main/java/redis/clients/jedis/BinaryJedis.java
+++ b/src/main/java/redis/clients/jedis/BinaryJedis.java
@@ -539,7 +539,7 @@ public Long dbSize() {
* 2.1.3, Redis >= 2.1.3 will happily update the timeout), or the key does not exist.
*/
@Override
- public Long expire(final byte[] key, final int seconds) {
+ public Long expire(final byte[] key, final long seconds) {
checkIsInMultiOrPipeline();
client.expire(key, seconds);
return client.getIntegerReply();
@@ -724,7 +724,7 @@ public Long setnx(final byte[] key, final byte[] value) {
* @return Status code reply
*/
@Override
- public String setex(final byte[] key, final int seconds, final byte[] value) {
+ public String setex(final byte[] key, final long seconds, final byte[] value) {
checkIsInMultiOrPipeline();
client.setex(key, seconds, value);
return client.getStatusCodeReply();
@@ -3680,14 +3680,14 @@ public byte[] dump(final byte[] key) {
}
@Override
- public String restore(final byte[] key, final int ttl, final byte[] serializedValue) {
+ public String restore(final byte[] key, final long ttl, final byte[] serializedValue) {
checkIsInMultiOrPipeline();
client.restore(key, ttl, serializedValue);
return client.getStatusCodeReply();
}
@Override
- public String restoreReplace(final byte[] key, final int ttl, final byte[] serializedValue) {
+ public String restoreReplace(final byte[] key, final long ttl, final byte[] serializedValue) {
checkIsInMultiOrPipeline();
client.restoreReplace(key, ttl, serializedValue);
return client.getStatusCodeReply();
@@ -4337,7 +4337,7 @@ public Long xlen(byte[] key) {
}
@Override
- public List xrange(byte[] key, byte[] start, byte[] end, long count) {
+ public List xrange(byte[] key, byte[] start, byte[] end, int count) {
checkIsInMultiOrPipeline();
client.xrange(key, start, end, count);
return client.getBinaryMultiBulkReply();
@@ -4400,42 +4400,61 @@ public Long xtrim(byte[] key, long maxLen, boolean approximateLength) {
}
@Override
- public List xpending(byte[] key, byte[] groupname, byte[] start, byte[] end, int count, byte[] consumername) {
+ public List