|
91 | 91 | * @author Jungtaek Lim |
92 | 92 | * @author Konstantin Shchepanovskyi |
93 | 93 | * @author David Liu |
| 94 | + * @author Milan Agatonovic |
94 | 95 | */ |
95 | 96 | public class JedisConnection extends AbstractRedisConnection { |
96 | 97 |
|
@@ -972,27 +973,16 @@ public Long ttl(byte[] key) { |
972 | 973 |
|
973 | 974 | public Boolean pExpire(byte[] key, long millis) { |
974 | 975 |
|
975 | | -/* |
976 | | - * @see DATAREDIS-286 to avoid overflow in Jedis |
977 | | - * |
978 | | - * TODO Remove this workaround when we upgrade to a Jedis version that contains a |
979 | | - * fix for: https://github.com/xetorthio/jedis/pull/575 |
980 | | - */ |
981 | | -if (millis > Integer.MAX_VALUE) { |
982 | | - |
983 | | -return pExpireAt(key, time() + millis); |
984 | | -} |
985 | | - |
986 | 976 | try { |
987 | 977 | if (isPipelined()) { |
988 | | -pipeline(new JedisResult(pipeline.pexpire(key, (int) millis), JedisConverters.longToBoolean())); |
| 978 | +pipeline(new JedisResult(pipeline.pexpire(key, millis), JedisConverters.longToBoolean())); |
989 | 979 | return null; |
990 | 980 | } |
991 | 981 | if (isQueueing()) { |
992 | | -transaction(new JedisResult(transaction.pexpire(key, (int) millis), JedisConverters.longToBoolean())); |
| 982 | +transaction(new JedisResult(transaction.pexpire(key, millis), JedisConverters.longToBoolean())); |
993 | 983 | return null; |
994 | 984 | } |
995 | | -return JedisConverters.toBoolean(jedis.pexpire(key, (int) millis)); |
| 985 | +return JedisConverters.toBoolean(jedis.pexpire(key, millis)); |
996 | 986 | } catch (Exception ex) { |
997 | 987 | throw convertJedisAccessException(ex); |
998 | 988 | } |
@@ -1327,14 +1317,14 @@ public void pSetEx(byte[] key, long milliseconds, byte[] value) { |
1327 | 1317 |
|
1328 | 1318 | try { |
1329 | 1319 | if (isPipelined()) { |
1330 | | -doPipelined(pipeline.psetex(key, (int) milliseconds, value)); |
| 1320 | +doPipelined(pipeline.psetex(key, milliseconds, value)); |
1331 | 1321 | return; |
1332 | 1322 | } |
1333 | 1323 | if (isQueueing()) { |
1334 | | -doQueued(transaction.psetex(key, (int) milliseconds, value)); |
| 1324 | +doQueued(transaction.psetex(key, milliseconds, value)); |
1335 | 1325 | return; |
1336 | 1326 | } |
1337 | | -jedis.psetex(key, (int) milliseconds, value); |
| 1327 | +jedis.psetex(key, milliseconds, value); |
1338 | 1328 | } catch (Exception ex) { |
1339 | 1329 | throw convertJedisAccessException(ex); |
1340 | 1330 | } |
|
0 commit comments