Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>1.8.0.BUILD-SNAPSHOT</version>
<version>1.8.0.DATAREDIS-564-SNAPSHOT</version>

<name>Spring Data Redis</name>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -801,15 +801,10 @@ public Boolean exists(byte[] key) {

public Boolean expire(byte[] key, long seconds) {

/*
* @see DATAREDIS-286 to avoid overflow in Jedis
*
* TODO Remove this workaround when we upgrade to a Jedis version that contains a
* fix for: https://github.com/xetorthio/jedis/pull/575
*/
if (seconds > Integer.MAX_VALUE) {
Assert.notNull(key, "Key must not be null!");

return pExpireAt(key, time() + TimeUnit.SECONDS.toMillis(seconds));
if (seconds > Integer.MAX_VALUE) {
return pExpire(key, TimeUnit.SECONDS.toMillis(seconds));
}

try {
Expand All @@ -828,6 +823,9 @@ public Boolean expire(byte[] key, long seconds) {
}

public Boolean expireAt(byte[] key, long unixTime) {

Assert.notNull(key, "Key must not be null!");

try {
if (isPipelined()) {
pipeline(new JedisResult(pipeline.expireAt(key, unixTime), JedisConverters.longToBoolean()));
Expand Down Expand Up @@ -1021,6 +1019,8 @@ public Long ttl(byte[] key, TimeUnit timeUnit) {
}

public Boolean pExpire(byte[] key, long millis) {

Assert.notNull(key, "Key must not be null!");

try {
if (isPipelined()) {
Expand All @@ -1038,6 +1038,9 @@ public Boolean pExpire(byte[] key, long millis) {
}

public Boolean pExpireAt(byte[] key, long unixTimeInMillis) {

Assert.notNull(key, "Key must not be null!");

try {
if (isPipelined()) {
pipeline(new JedisResult(pipeline.pexpireAt(key, unixTimeInMillis), JedisConverters.longToBoolean()));
Expand Down