io.vertx.ext.consul.KeyValue.setLockIndex()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中io.vertx.ext.consul.KeyValue.setLockIndex()方法的一些代码示例,展示了KeyValue.setLockIndex()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KeyValue.setLockIndex()方法的具体详情如下:
包路径:io.vertx.ext.consul.KeyValue
类名称:KeyValue
方法名:setLockIndex

KeyValue.setLockIndex介绍

[英]Set the number of times this key has successfully been acquired in a lock.
[中]设置在锁中成功获取此密钥的次数。

代码示例

代码示例来源:origin: io.vertx/vertx-consul-client

case "lockIndex":
 if (member.getValue() instanceof Number) {
  obj.setLockIndex(((Number)member.getValue()).longValue());

代码示例来源: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());
}

相关文章