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

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

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

Jedis.rpushx介绍

暂无

代码示例

代码示例来源:origin: sohutv/cachecloud

@Override
 public Long execute(Jedis connection) {
  return connection.rpushx(key, string);
 }
}.run(key);

代码示例来源:origin: sohutv/cachecloud

@Override
 public Long execute(Jedis connection) {
  return connection.rpushx(key, arg);
 }
}.runBinary(key);

代码示例来源:origin: sohutv/cachecloud

public Long execute(Jedis connection) {
    return connection.rpushx(keyByte, string);
  }
}.runBinary(keyByte);

代码示例来源:origin: sohutv/cachecloud

@Override
public Long rpushx(byte[] key, byte[]... string) {
 Jedis j = getShard(key);
 return j.rpushx(key, string);
}

代码示例来源:origin: sohutv/cachecloud

@Override
public Long rpushx(String key, String... string) {
 Jedis j = getShard(key);
 return j.rpushx(key, string);
}

代码示例来源:origin: Netflix/conductor

@Override
public Long rpushx(String key, String... string) {
 Jedis jedis = null;
  try {
   jedis = jedisPool.getResource();
   return jedis.rpushx(key, string);
  } finally {
   if (jedis != null)
    jedis.close();
  }
}

代码示例来源:origin: caoxinyu/RedisClient

@Override
protected void command() {
  jedis.select(db);
  if (jedis.exists(key) && getValueType(key) != NodeType.LIST)
    throw new RuntimeException(RedisClient.i18nFile.getText(I18nFile.LISTEXIST) + key);
  beforeAdd();
  
  for (String value : values) {
    if (headTail && exist)
      jedis.rpush(key, value);
    else if (headTail && !exist)
      jedis.rpushx(key, value);
    else if (!headTail && exist)
      jedis.lpush(key, value);
    else
      jedis.lpushx(key, value);
  }
  afterAdd();
}

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

@Override
public Long rPushX(byte[] key, byte[] value) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(value, "Value must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newJedisResult(connection.getRequiredPipeline().rpushx(key, value)));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newJedisResult(connection.getRequiredTransaction().rpushx(key, value)));
      return null;
    }
    return connection.getJedis().rpushx(key, value);
  } catch (Exception ex) {
    throw convertJedisAccessException(ex);
  }
}

代码示例来源:origin: io.leopard/leopard-redis

@Override
  public Object execute(Jedis jedis) {
    return jedis.rpushx(key, string);
  }
});

代码示例来源:origin: io.leopard/leopard-redis

@Override
  public Object execute(Jedis jedis) {
    return jedis.rpushx(key, string);
  }
});

代码示例来源:origin: io.leopard/leopard-redis

@Override
public Long rpushx(String key, String... string) {
  return jedis.rpushx(key, string);
}

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

@Override
 public Long execute(Jedis connection) {
  return connection.rpushx(key, string);
 }
}.run(key);

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

@Override
public Long rpushx(final byte[] key, final byte[]... string) {
 Jedis j = getShard(key);
 return j.rpushx(key, string);
}

代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis

@Override
public Long rpushx(byte[] key, byte[]... string) {
 String command = "rpushx";
 return instrumented(command, payloadSize(string), () -> delegated.rpushx(key, string));
}

代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis

@Override
public Long rpushx(String key, String... string) {
 String command = "rpushx";
 return instrumented(command, payloadSize(string), () -> delegated.rpushx(key, string));
}

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

public Long rpushx(String key, String... string) {
  Jedis jedis = getJedis();
  try {
    return jedis.rpushx(key, string);
  } finally {Streams.safeClose(jedis);}
}

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

public Long rpushx(byte[] key, byte[]... string) {
  Jedis jedis = getJedis();
  try {
    return jedis.rpushx(key, string);
  } finally {Streams.safeClose(jedis);}
}

代码示例来源:origin: com.netflix.conductor/conductor-redis-persistence

@Override
public Long rpushx(String key, String... string) {
 Jedis jedis = null;
  try {
   jedis = jedisPool.getResource();
   return jedis.rpushx(key, string);
  } finally {
   if (jedis != null)
    jedis.close();
  }
}

代码示例来源:origin: com.github.yamingd.argo/argo-redis

public Long execute(final Jedis conn) throws Exception {
    byte[][] bytes = new byte[values.length][];
    for (int i = 0; i < values.length; i++) {
      bytes[i] = getRedisBuffer().write(values[i]);
    }
    return conn.rpushx(SafeEncoder.encode(key), bytes);
  }
});

代码示例来源:origin: io.enoa/nosql-redis

default Long rpushx(String key, Object... values) {
  return this.run((jedis, serializer) ->
   jedis.rpushx(SafeEncoder.encode(key), EnoaRedisConvert.with(serializer).toBytesValues(values)));
 }
}

相关文章

微信公众号

最新文章

更多

Jedis类方法