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

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

Introduction

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

Prototype

void shutdown(ShutdownOption option);

Source Link

Document

Shutdown server.

Usage

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

/**
 * Shutdown server./*from  w  ww  . j a  v  a  2 s  . co  m*/
 * <p>
 * See http://redis.io/commands/shutdown
 * 
 * @param option option
 * @since 1.3
 */
public static void shutdown(ShutdownOption option) {
    redisTemplate.execute(new RedisCallback<Void>() {
        @Override
        public Void doInRedis(RedisConnection redis) throws DataAccessException {
            redis.shutdown(option);
            return null;
        }
    });
}

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

/**
 * Shutdown server.//from  w ww  .  ja  v  a 2 s .com
 * <p>
 * See http://redis.io/commands/shutdown
 * 
 * @param option option
 * @since 1.3
 */
public void shutdown(ShutdownOption option) {
    redisTemplate.execute(new RedisCallback<Void>() {
        @Override
        public Void doInRedis(RedisConnection redis) throws DataAccessException {
            redis.shutdown(option);
            return null;
        }
    });
}