redis.clients.jedis.JedisCluster.append()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(114)

本文整理了Java中redis.clients.jedis.JedisCluster.append()方法的一些代码示例,展示了JedisCluster.append()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JedisCluster.append()方法的具体详情如下:
包路径:redis.clients.jedis.JedisCluster
类名称:JedisCluster
方法名:append

JedisCluster.append介绍

暂无

代码示例

代码示例来源:origin: spring-projects/spring-data-redis

@Override
public Long append(byte[] key, byte[] value) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(value, "Value must not be null!");
  try {
    return connection.getCluster().append(key, value);
  } catch (Exception ex) {
    throw convertJedisAccessException(ex);
  }
}

代码示例来源:origin: hhfcyong/xxxx-dubbo

/**
 * 如果 key 已经存在并且是一个字符串, APPEND 命令将 value 追加到 key 原来的值的末尾
 * 如果 key 不存在, APPEND 就简单地将给定 key 设为 value ,就像执行 SET key value 一样
 * @param key
 * @param value
 * @return  追加 value 之后, key 中字符串的长度
 */
public Long append(String key,String value){
  return jedisCluster.append(key, value);
}
/**

代码示例来源:origin: net.oschina.j2cache/j2cache-core

@Override
public Long append(byte[] bytes, byte[] bytes1) {
  return cluster.append(bytes, bytes1);
}

代码示例来源:origin: org.nutz/nutz-integration-jedis

public Long append(String key, String value) {
  return jedisCluster.append(key, value);
}

代码示例来源:origin: org.nutz/nutz-integration-jedis

public Long append(byte[] key, byte[] value) {
  return jedisCluster.append(key, value);
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public Long append(byte[] key, byte[] value) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(value, "Value must not be null!");
  try {
    return connection.getCluster().append(key, value);
  } catch (Exception ex) {
    throw convertJedisAccessException(ex);
  }
}

代码示例来源:origin: org.springframework.data/spring-data-redis

@Override
public Long append(byte[] key, byte[] value) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(value, "Value must not be null!");
  try {
    return connection.getCluster().append(key, value);
  } catch (Exception ex) {
    throw convertJedisAccessException(ex);
  }
}

代码示例来源:origin: org.nanoframework/nano-orm-jedis

@Override
public long append(final String key, final String value, final String separator) {
  Assert.hasText(key);
  Assert.hasText(value);
  final String newValue;
  if (StringUtils.isNotEmpty(separator) && exists(key)) {
    newValue = separator + value;
  } else {
    newValue = value;
  }
  try {
    return cluster.append(key, newValue);
  } catch (final Throwable e) {
    throw new RedisClientException(e.getMessage(), e);
  }
}

相关文章

微信公众号

最新文章

更多

JedisCluster类方法