本文整理了Java中io.vertx.redis.RedisClient.del
方法的一些代码示例,展示了RedisClient.del
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RedisClient.del
方法的具体详情如下:
包路径:io.vertx.redis.RedisClient
类名称:RedisClient
方法名:del
[英]Delete a key
[中]删除密钥
代码示例来源:origin: io.vertx/vertx-rx-java
/**
* Delete a key
* @param key Keys to delete
* @param handler Handler for the result of this call.
* @return
*/
public io.vertx.rxjava.redis.RedisClient del(String key, Handler<AsyncResult<Long>> handler) {
delegate.del(key, handler);
return this;
}
代码示例来源:origin: vert-x3/vertx-rx
/**
* Delete a key
* @param key Keys to delete
* @param handler Handler for the result of this call.
* @return
*/
public io.vertx.rxjava.redis.RedisClient del(String key, Handler<AsyncResult<Long>> handler) {
delegate.del(key, handler);
return this;
}
代码示例来源:origin: org.swisspush.gateleen/gateleen-scheduler
public void stop() {
log.info("Stopping scheduler [ " + cronExpression.getCronExpression() + " ] ");
vertx.cancelTimer(timer);
String key = "schedulers:" + name;
redisClient.del(key, reply -> {
if (reply.failed()) {
log.error("Could not reset scheduler '" + key + "'");
}
});
}
代码示例来源:origin: org.swisspush/redisques
private void deleteAllQueueItems(Message<JsonObject> event) {
JsonObject payload = event.body().getJsonObject(PAYLOAD);
boolean unlock = payload.getBoolean(UNLOCK, false);
String queue = payload.getString(QUEUENAME);
redisClient.del(buildQueueKey(queue), deleteReply -> {
if (deleteReply.failed()) {
log.warn("Failed to deleteAllQueueItems. But we'll continue anyway. _dfc641c96464_", deleteReply.cause());
// May we should 'fail()' here. But:
// 1st: We don't, to keep backward compatibility
// 2nd: We don't, to may unlock below.
}
if (unlock) {
redisClient.hdel(getLocksKey(), queue, unlockReply -> {
if (unlockReply.failed()) {
log.warn("Failed to unlock queue '{}'. Will continue anyway _d08ae0e0986587_.", queue, unlockReply.cause());
// IMO we should 'fail()' here. But we don't, to keep backward compatibility.
}
replyResultGreaterThanZero(event, deleteReply);
});
} else {
replyResultGreaterThanZero(event, deleteReply);
}
});
}
内容来源于网络,如有侵权,请联系作者删除!