本文整理了Java中io.vertx.redis.RedisClient.zadd
方法的一些代码示例,展示了RedisClient.zadd
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RedisClient.zadd
方法的具体详情如下:
包路径:io.vertx.redis.RedisClient
类名称:RedisClient
方法名:zadd
[英]Add one or more members to a sorted set, or update its score if it already exists
[中]将一个或多个成员添加到排序集,或更新其分数(如果已存在)
代码示例来源:origin: io.vertx/vertx-rx-java
/**
* Add one or more members to a sorted set, or update its score if it already exists
* @param key Key string
* @param score Score used for sorting
* @param member New member key
* @param handler Handler for the result of this call.
* @return
*/
public io.vertx.rxjava.redis.RedisClient zadd(String key, double score, String member, Handler<AsyncResult<Long>> handler) {
delegate.zadd(key, score, member, handler);
return this;
}
代码示例来源:origin: vert-x3/vertx-rx
/**
* Add one or more members to a sorted set, or update its score if it already exists
* @param key Key string
* @param score Score used for sorting
* @param member New member key
* @param handler Handler for the result of this call.
* @return
*/
public io.vertx.rxjava.redis.RedisClient zadd(String key, double score, String member, Handler<AsyncResult<Long>> handler) {
delegate.zadd(key, score, member, handler);
return this;
}
代码示例来源:origin: org.swisspush.gateleen/gateleen-queue
@Override
public Future<Void> lockQueue(String queueName, PatternAndCircuitHash patternAndCircuitHash) {
Future<Void> future = Future.future();
redisClient.zadd(buildQueuesKey(patternAndCircuitHash.getCircuitHash()), System.currentTimeMillis(), queueName, event -> {
if(event.failed()){
future.fail(event.cause().getMessage());
return;
}
future.complete();
});
return future;
}
代码示例来源:origin: sczyh30/vertx-kue
/**
* Refresh ttl
*/
Future<Job> refreshTtl() {
Future<Job> future = Future.future();
if (this.state == JobState.ACTIVE && this.ttl > 0) {
client.zadd(RedisHelper.getStateKey(this.state), System.currentTimeMillis() + ttl,
this.zid, _completer(future, this));
}
return future;
}
代码示例来源:origin: org.swisspush/redisques
/**
* Stores the queue name in a sorted set with the current date as score.
*
* @param queue the name of the queue
* @param handler (optional) To get informed when done.
*/
private void updateTimestamp(final String queue, Handler<AsyncResult<Long>> handler) {
long ts = System.currentTimeMillis();
if (log.isTraceEnabled()) {
log.trace("RedisQues update timestamp for queue: " + queue + " to: " + ts);
}
redisClient.zadd(getQueuesKey(), ts, queue, handler);
}
内容来源于网络,如有侵权,请联系作者删除!