List of usage examples for org.springframework.data.redis.connection RedisConnection time
@Nullable Long time();
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Request server timestamp using {@code TIME} command. * /*from w w w . ja v a2 s . co m*/ * @return current server time in milliseconds. * @since 1.1 */ public static Long time() { return redisTemplate.execute(new RedisCallback<Long>() { @Override public Long doInRedis(RedisConnection redis) throws DataAccessException { return redis.time(); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Request server timestamp using {@code TIME} command. * /*from w ww. ja v a 2s .co m*/ * @return current server time in milliseconds. * @since 1.1 */ public Long time() { return redisTemplate.execute(new RedisCallback<Long>() { @Override public Long doInRedis(RedisConnection redis) throws DataAccessException { return redis.time(); } }); }