io.vertx.redis.RedisClient.lindex()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(135)

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

RedisClient.lindex介绍

[英]Get an element from a list by its index
[中]通过索引从列表中获取元素

代码示例

代码示例来源:origin: vert-x3/vertx-rx

/**
 * Get an element from a list by its index
 * @param key Key string
 * @param index Index of list element to get
 * @param handler Handler for the result of this call.
 * @return 
 */
public io.vertx.rxjava.redis.RedisClient lindex(String key, int index, Handler<AsyncResult<String>> handler) { 
 delegate.lindex(key, index, handler);
 return this;
}

代码示例来源:origin: io.vertx/vertx-rx-java

/**
 * Get an element from a list by its index
 * @param key Key string
 * @param index Index of list element to get
 * @param handler Handler for the result of this call.
 * @return 
 */
public io.vertx.rxjava.redis.RedisClient lindex(String key, int index, Handler<AsyncResult<String>> handler) { 
 delegate.lindex(key, index, handler);
 return this;
}

代码示例来源:origin: org.swisspush/redisques

private void getQueueItem(Message<JsonObject> event) {
  String key = getQueuesPrefix() + event.body().getJsonObject(PAYLOAD).getString(QUEUENAME);
  int index = event.body().getJsonObject(PAYLOAD).getInteger(INDEX);
  redisClient.lindex(key, index, new GetQueueItemHandler(event));
}

代码示例来源:origin: org.swisspush/redisques

redisClient.lindex(key, 0, answer -> {
  if (answer.failed()) {
    log.error("Failed to peek queue '{}'", queue, answer.cause());

相关文章

RedisClient类方法