本文整理了Java中redis.clients.jedis.Jedis.configSet()
方法的一些代码示例,展示了Jedis.configSet()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jedis.configSet()
方法的具体详情如下:
包路径:redis.clients.jedis.Jedis
类名称:Jedis
方法名:configSet
[英]Alter the configuration of a running Redis server. Not all the configuration parameters are supported.
The list of configuration parameters supported by CONFIG SET can be obtained issuing a #configGet(String) command.
The configuration set using CONFIG SET is immediately loaded by the Redis server that will start acting as specified starting from the next command.
Parameters value format
The value of the configuration parameter is the same as the one of the same parameter in the Redis configuration file, with the following exceptions:
代码示例来源:origin: spring-projects/spring-data-redis
@Override
public void setConfig(RedisClusterNode node, String param, String value) {
Assert.notNull(param, "Parameter must not be null!");
Assert.notNull(value, "Value must not be null!");
executeCommandOnSingleNode(client -> client.configSet(param, value), node);
}
代码示例来源:origin: spring-projects/spring-data-redis
@Override
public void setConfig(String param, String value) {
Assert.notNull(param, "Parameter must not be null!");
Assert.notNull(value, "Value must not be null!");
connection.getClusterCommandExecutor()
.executeCommandOnAllNodes((JedisClusterCommandCallback<String>) client -> client.configSet(param, value));
}
代码示例来源:origin: spring-projects/spring-data-redis
@Override
public void setConfig(String param, String value) {
Assert.notNull(param, "Parameter must not be null!");
Assert.notNull(value, "Value must not be null!");
try {
if (isPipelined()) {
pipeline(connection.newStatusResult(connection.getRequiredPipeline().configSet(param, value)));
return;
}
if (isQueueing()) {
transaction(connection.newStatusResult(connection.getRequiredTransaction().configSet(param, value)));
return;
}
connection.getJedis().configSet(param, value);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: uber/chaperone
private void setRedisConfig(String configName, String newValue) {
List<String> config = jedis.configGet(configName);
logger.info("Set redisConfig={} from oldValue={} to newValue={}", configName, config.get(1), newValue);
String status = jedis.configSet(configName, newValue);
Preconditions.checkState(status.equals("OK"), String.format("Set %s to %s for redis failed", configName, newValue));
}
代码示例来源:origin: Impetus/Kundera
/**
* Gets the and set connection.
*
* @return the and set connection
*/
private Jedis getAndSetConnection()
{
Jedis conn = factory.getConnection();
this.connection = conn;
// If resource is not null means a transaction in progress.
if (settings != null)
{
for (String key : settings.keySet())
{
conn.configSet(key, settings.get(key).toString());
}
}
return conn;
}
代码示例来源:origin: Impetus/Kundera
connection.configSet(key.toString(), props.get(key).toString());
代码示例来源:origin: io.leopard/leopard-redis
@Override
public String configSet(String parameter, String value) {
return jedis.configSet(parameter, value);
}
代码示例来源:origin: mindwind/craft-atom
private String configset0(Jedis j, String parameter, String value) {
return j.configSet(parameter, value);
}
代码示例来源:origin: penggle/jedis-ms-sentinel
public String configSet(String parameter, String value) {
return master.configSet(parameter, value);
}
代码示例来源:origin: io.leopard/leopard-redis
@Override
public String configSet(String parameter, String value) {
return jedis.configSet(parameter, value);
}
代码示例来源:origin: penggle/jedis-ms-sentinel
public byte[] configSet(byte[] parameter, byte[] value) {
return master.configSet(parameter, value);
}
代码示例来源:origin: org.springframework.data/spring-data-redis
@Override
public void setConfig(RedisClusterNode node, String param, String value) {
Assert.notNull(param, "Parameter must not be null!");
Assert.notNull(value, "Value must not be null!");
executeCommandOnSingleNode(client -> client.configSet(param, value), node);
}
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public String configSet(String parameter, String value) {
String command = "configSet";
return instrumented(command, () -> delegated.configSet(parameter, value));
}
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public byte[] configSet(byte[] parameter, byte[] value) {
String command = "configSet";
return instrumented(command, () -> delegated.configSet(parameter, value));
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public void setConfig(RedisClusterNode node, String param, String value) {
Assert.notNull(param, "Parameter must not be null!");
Assert.notNull(value, "Value must not be null!");
executeCommandOnSingleNode(client -> client.configSet(param, value), node);
}
代码示例来源:origin: io.enoa/nosql-redis
default String configset(String parameter, String value) {
return this.run((jedis, serializer) -> jedis.configSet(parameter, value));
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public void setConfig(String param, String value) {
Assert.notNull(param, "Parameter must not be null!");
Assert.notNull(value, "Value must not be null!");
connection.getClusterCommandExecutor()
.executeCommandOnAllNodes((JedisClusterCommandCallback<String>) client -> client.configSet(param, value));
}
代码示例来源:origin: org.springframework.data/spring-data-redis
@Override
public void setConfig(String param, String value) {
Assert.notNull(param, "Parameter must not be null!");
Assert.notNull(value, "Value must not be null!");
connection.getClusterCommandExecutor()
.executeCommandOnAllNodes((JedisClusterCommandCallback<String>) client -> client.configSet(param, value));
}
代码示例来源:origin: org.springframework.data/spring-data-redis
@Override
public void setConfig(String param, String value) {
Assert.notNull(param, "Parameter must not be null!");
Assert.notNull(value, "Value must not be null!");
try {
if (isPipelined()) {
pipeline(connection.newStatusResult(connection.getRequiredPipeline().configSet(param, value)));
return;
}
if (isQueueing()) {
transaction(connection.newStatusResult(connection.getRequiredTransaction().configSet(param, value)));
return;
}
connection.getJedis().configSet(param, value);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public void setConfig(String param, String value) {
Assert.notNull(param, "Parameter must not be null!");
Assert.notNull(value, "Value must not be null!");
try {
if (isPipelined()) {
pipeline(connection.newStatusResult(connection.getRequiredPipeline().configSet(param, value)));
return;
}
if (isQueueing()) {
transaction(connection.newStatusResult(connection.getRequiredTransaction().configSet(param, value)));
return;
}
connection.getJedis().configSet(param, value);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
内容来源于网络,如有侵权,请联系作者删除!