本文整理了Java中io.vertx.ext.consul.KeyValue.setSession()
方法的一些代码示例,展示了KeyValue.setSession()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KeyValue.setSession()
方法的具体详情如下:
包路径:io.vertx.ext.consul.KeyValue
类名称:KeyValue
方法名:setSession
[英]Set the session that owns the lock
[中]设置拥有锁的会话
代码示例来源:origin: io.vertx/vertx-consul-client
case "session":
if (member.getValue() instanceof String) {
obj.setSession((String)member.getValue());
代码示例来源:origin: io.vertx/vertx-consul-client
static KeyValue parse(JsonObject json) {
return new KeyValue()
.setKey(json.getString(KEY_KEY))
.setValue(Utils.decode64(json.getString(VALUE_KEY)))
.setSession(json.getString(SESSION_KEY))
.setFlags(json.getLong(FLAGS_KEY, 0L))
.setCreateIndex(json.getLong(CREATE_KEY, 0L))
.setModifyIndex(json.getLong(MODIFY_KEY, 0L))
.setLockIndex(json.getLong(LOCK_KEY, 0L));
}
}
代码示例来源:origin: io.vertx/vertx-consul-client
public static KeyValue randomKeyValue() {
return new KeyValue()
.setKey(randomAlphaString(10))
.setValue(randomAlphaString(10))
.setSession(randomAlphaString(10))
.setCreateIndex(randomLong())
.setFlags(randomLong())
.setModifyIndex(randomLong())
.setLockIndex(randomLong());
}
内容来源于网络,如有侵权,请联系作者删除!