+ add expireAt on RedisConnection
This commit is contained in:
@@ -44,6 +44,8 @@ public interface RedisCommands extends RedisTxCommands, RedisStringCommands, Red
|
||||
|
||||
Boolean expire(byte[] key, int seconds);
|
||||
|
||||
Boolean expireAt(byte[] key, long unixTime);
|
||||
|
||||
Boolean persist(byte[] key);
|
||||
|
||||
Integer ttl(byte[] key);
|
||||
|
||||
@@ -190,6 +190,19 @@ public class JedisConnection implements RedisConnection {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean expireAt(byte[] key, long unixTime) {
|
||||
try {
|
||||
if (isQueueing()) {
|
||||
transaction.expireAt(key, unixTime);
|
||||
return null;
|
||||
}
|
||||
return (jedis.expireAt(key, unixTime) == 1);
|
||||
} catch (Exception ex) {
|
||||
throw convertJedisAccessException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<byte[]> keys(byte[] pattern) {
|
||||
try {
|
||||
|
||||
@@ -134,6 +134,15 @@ public class JredisConnection implements RedisConnection {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean expireAt(byte[] key, long unixTime) {
|
||||
try {
|
||||
return jredis.expireat(JredisUtils.convert(charset, key), unixTime);
|
||||
} catch (RedisException ex) {
|
||||
throw JredisUtils.convertJredisAccessException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<byte[]> keys(byte[] pattern) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user