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();

Source Link

Document

Shutdown server.

Usage

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

/**
 * Shutdown server./*from w  ww.ja  v a2s.  c  o m*/
 * <p>
 * See http://redis.io/commands/shutdown
 */
public static void shutdown() {
    redisTemplate.execute(new RedisCallback<Void>() {
        @Override
        public Void doInRedis(RedisConnection redis) throws DataAccessException {
            redis.shutdown();
            return null;
        }
    });
}

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

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