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

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

Introduction

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

Prototype

@Deprecated
default void bgWriteAof() 

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>//from   w w  w . ja v a 2s .c o  m
 * See http://redis.io/commands/bgrewriteaof
 * 
 * @deprecated As of 1.3, use {@link #bgReWriteAof}.
 */
@Deprecated
public static void bgWriteAof() {
    redisTemplate.execute(new RedisCallback<Void>() {
        @Override
        public Void doInRedis(RedisConnection redis) throws DataAccessException {
            redis.bgWriteAof();
            return null;
        }
    });
}

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

/**
 * Start an {@literal Append Only File} rewrite process on server.
 * <p>//from   w w  w  . j  a  v a2  s  .c om
 * See http://redis.io/commands/bgrewriteaof
 * 
 * @deprecated As of 1.3, use {@link #bgReWriteAof}.
 */
@Deprecated
public void bgWriteAof() {
    redisTemplate.execute(new RedisCallback<Void>() {
        @Override
        public Void doInRedis(RedisConnection redis) throws DataAccessException {
            redis.bgWriteAof();
            return null;
        }
    });
}