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

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

Introduction

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

Prototype

void bgReWriteAof();

Source Link

Document

Start an Append Only File rewrite process on server.

Usage

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

/**
 * Start an {@literal Append Only File} rewrite process on server.
 * <p>//ww w .jav a  2s  .  c  o  m
 * See http://redis.io/commands/bgrewriteaof
 * 
 * @since 1.3
 */
public static void bgReWriteAof() {
    redisTemplate.execute(new RedisCallback<Void>() {
        @Override
        public Void doInRedis(RedisConnection redis) throws DataAccessException {
            redis.bgReWriteAof();
            return null;
        }
    });
}

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

/**
 * Start an {@literal Append Only File} rewrite process on server.
 * <p>//from ww  w.  j  a v  a 2s.  c o  m
 * See http://redis.io/commands/bgrewriteaof
 * 
 * @since 1.3
 */
public void bgReWriteAof() {
    redisTemplate.execute(new RedisCallback<Void>() {
        @Override
        public Void doInRedis(RedisConnection redis) throws DataAccessException {
            redis.bgReWriteAof();
            return null;
        }
    });
}