Example usage for org.springframework.data.redis.connection RedisConnection lastSave

List of usage examples for org.springframework.data.redis.connection RedisConnection lastSave

Introduction

In this page you can find the example usage for org.springframework.data.redis.connection RedisConnection lastSave.

Prototype

@Nullable
Long lastSave();

Source Link

Document

Get time of last #bgSave() operation in seconds.

Usage

From source file:com.zxy.commons.cache.RedisUtils.java

/**
 * Get time of last {@link #bgSave()} operation in seconds.
 * <p>// w  w w .j  a  va 2 s  .com
 * See http://redis.io/commands/lastsave
 * 
 * @return Long
 */
public static Long lastSave() {
    return redisTemplate.execute(new RedisCallback<Long>() {
        @Override
        public Long doInRedis(RedisConnection redis) throws DataAccessException {
            return redis.lastSave();
        }
    });
}

From source file:com.zxy.commons.cache.RedisHelper.java

/**
 * Get time of last {@link #bgSave()} operation in seconds.
 * <p>/*from   w ww  . j a va  2s  . c  om*/
 * See http://redis.io/commands/lastsave
 * 
 * @return Long
 */
public Long lastSave() {
    return redisTemplate.execute(new RedisCallback<Long>() {
        @Override
        public Long doInRedis(RedisConnection redis) throws DataAccessException {
            return redis.lastSave();
        }
    });
}