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

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

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

KeyValue.getCreateIndex介绍

[英]Get the internal index value that represents when the entry was created.
[中]

代码示例

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

public static void toJson(KeyValue obj, java.util.Map<String, Object> json) {
  json.put("createIndex", obj.getCreateIndex());
  json.put("flags", obj.getFlags());
  if (obj.getKey() != null) {
   json.put("key", obj.getKey());
  }
  json.put("lockIndex", obj.getLockIndex());
  json.put("modifyIndex", obj.getModifyIndex());
  if (obj.getSession() != null) {
   json.put("session", obj.getSession());
  }
  if (obj.getValue() != null) {
   json.put("value", obj.getValue());
  }
 }
}

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

private void checkKeyValue(KeyValue expected, KeyValue actual) {
 assertEquals(expected, actual);
 assertEquals(expected.hashCode(), actual.hashCode());
 assertEquals(expected.getKey(), actual.getKey());
 assertEquals(expected.getValue(), actual.getValue());
 assertEquals(expected.getSession(), actual.getSession());
 assertEquals(expected.getCreateIndex(), actual.getCreateIndex());
 assertEquals(expected.getFlags(), actual.getFlags());
 assertEquals(expected.getModifyIndex(), actual.getModifyIndex());
 assertEquals(expected.getLockIndex(), actual.getLockIndex());
}

相关文章