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

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

Introduction

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

Prototype

void setConfig(String param, String value);

Source Link

Document

Set server configuration for param to value .

Usage

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

/**
 * Set server configuration for {@code param} to {@code value}.
 * <p>/*  w ww  . ja v a2s  .  c  o m*/
 * See http://redis.io/commands/config-set
 * 
 * @param param param
 * @param value value
 */
public static void setConfig(String param, String value) {
    redisTemplate.execute(new RedisCallback<Void>() {
        @Override
        public Void doInRedis(RedisConnection redis) throws DataAccessException {
            redis.setConfig(param, value);
            return null;
        }
    });
}

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

/**
 * Set server configuration for {@code param} to {@code value}.
 * <p>/*from  w ww  .  ja va 2s.  c o  m*/
 * See http://redis.io/commands/config-set
 * 
 * @param param param
 * @param value value
 */
public void setConfig(String param, String value) {
    redisTemplate.execute(new RedisCallback<Void>() {
        @Override
        public Void doInRedis(RedisConnection redis) throws DataAccessException {
            redis.setConfig(param, value);
            return null;
        }
    });
}