本文整理了Java中io.vertx.redis.RedisClient.hexists
方法的一些代码示例,展示了RedisClient.hexists
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RedisClient.hexists
方法的具体详情如下:
包路径:io.vertx.redis.RedisClient
类名称:RedisClient
方法名:hexists
[英]Determine if a hash field exists
[中]确定哈希字段是否存在
代码示例来源:origin: io.vertx/vertx-rx-java
/**
* Determine if a hash field exists
* @param key Key string
* @param field Field name
* @param handler Handler for the result of this call.
* @return
*/
public io.vertx.rxjava.redis.RedisClient hexists(String key, String field, Handler<AsyncResult<Long>> handler) {
delegate.hexists(key, field, handler);
return this;
}
代码示例来源:origin: vert-x3/vertx-rx
/**
* Determine if a hash field exists
* @param key Key string
* @param field Field name
* @param handler Handler for the result of this call.
* @return
*/
public io.vertx.rxjava.redis.RedisClient hexists(String key, String field, Handler<AsyncResult<Long>> handler) {
delegate.hexists(key, field, handler);
return this;
}
代码示例来源:origin: org.swisspush/redisques
private Future<Boolean> isQueueLocked(final String queue) {
Future<Boolean> future = Future.future();
redisClient.hexists(getLocksKey(), queue, event -> {
if (event.failed()) {
log.warn("Failed to check if queue '{}' is locked. Assume no.", queue, event.cause());
// TODO: Is it correct, to assume a queue is not locked in case our query failed?
// Previous implementation assumed this. See "https://github.com/hiddenalpha/vertx-redisques/blob/v2.5.1/src/main/java/org/swisspush/redisques/RedisQues.java#L856".
future.complete(Boolean.FALSE);
} else if (event.result() == null) {
future.complete(Boolean.FALSE);
} else {
future.complete(event.result() == 1);
}
});
return future;
}
内容来源于网络,如有侵权,请联系作者删除!