List of usage examples for org.springframework.data.redis.connection RedisConnection expireAt
@Nullable Boolean expireAt(byte[] key, long unixTime);
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Set the expiration for given {@code key} as a {@literal UNIX} timestamp. * <p>// ww w. jav a 2 s . c o m * See http://redis.io/commands/expireat * * @param key key * @param unixTime unixTime * @return Boolean */ public static Boolean expireAt(byte[] key, long unixTime) { return redisTemplate.execute(new RedisCallback<Boolean>() { @Override public Boolean doInRedis(RedisConnection redis) throws DataAccessException { return redis.expireAt(key, unixTime); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Set the expiration for given {@code key} as a {@literal UNIX} timestamp. * <p>/* w ww. j ava 2 s . co m*/ * See http://redis.io/commands/expireat * * @param key key * @param unixTime unixTime * @return Boolean */ public Boolean expireAt(byte[] key, long unixTime) { return redisTemplate.execute(new RedisCallback<Boolean>() { @Override public Boolean doInRedis(RedisConnection redis) throws DataAccessException { return redis.expireAt(key, unixTime); } }); }