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

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

Introduction

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

Prototype

@Nullable
Properties getConfig(String pattern);

Source Link

Document

Load configuration parameters for given pattern from server.

Usage

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

/**
 * Load configuration parameters for given {@code pattern} from server.
 * <p>//  w ww.ja  va  2  s .c o m
 * See http://redis.io/commands/config-get
 * 
 * @param pattern pattern
 * @return List<String>
 */
public static List<String> getConfig(String pattern) {
    return redisTemplate.execute(new RedisCallback<List<String>>() {
        @Override
        public List<String> doInRedis(RedisConnection redis) throws DataAccessException {
            return redis.getConfig(pattern);
        }
    });
}

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

/**
 * Load configuration parameters for given {@code pattern} from server.
 * <p>/*from   ww  w  . j  ava2 s.c o m*/
 * See http://redis.io/commands/config-get
 * 
 * @param pattern pattern
 * @return List<String>
 */
public List<String> getConfig(String pattern) {
    return redisTemplate.execute(new RedisCallback<List<String>>() {
        @Override
        public List<String> doInRedis(RedisConnection redis) throws DataAccessException {
            return redis.getConfig(pattern);
        }
    });
}