本文整理了Java中io.vertx.redis.RedisClient.lindex
方法的一些代码示例,展示了RedisClient.lindex
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RedisClient.lindex
方法的具体详情如下:
包路径:io.vertx.redis.RedisClient
类名称: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());
内容来源于网络,如有侵权,请联系作者删除!