org.elasticsearch.action.WriteConsistencyLevel.id()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(122)

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

WriteConsistencyLevel.id介绍

暂无

代码示例

代码示例来源:origin: harbby/presto-connectors

@Override
  public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeByte(consistencyLevel.id());
    out.writeVInt(requests.size());
    for (ActionRequest request : requests) {
      if (request instanceof IndexRequest) {
        out.writeByte((byte) 0);
      } else if (request instanceof DeleteRequest) {
        out.writeByte((byte) 1);
      } else if (request instanceof UpdateRequest) {
        out.writeByte((byte) 2);
      }
      request.writeTo(out);
    }
    out.writeBoolean(refresh);
    timeout.writeTo(out);
  }
}

代码示例来源:origin: com.strapdata.elasticsearch.module/reindex

@Override
public void writeTo(StreamOutput out) throws IOException {
  super.writeTo(out);
  searchRequest.writeTo(out);
  out.writeBoolean(abortOnVersionConflict);
  out.writeVInt(size);
  out.writeBoolean(refresh);
  timeout.writeTo(out);
  out.writeByte(consistency.id());
  retryBackoffInitialTime.writeTo(out);
  out.writeVInt(maxRetries);
  if (out.getVersion().onOrAfter(Version.V_2_4_0)) {
    out.writeFloat(requestsPerSecond);
  }
}

代码示例来源:origin: harbby/presto-connectors

@Override
public void writeTo(StreamOutput out) throws IOException {
  super.writeTo(out);
  if (shardId != null) {
    out.writeBoolean(true);
    shardId.writeTo(out);
  } else {
    out.writeBoolean(false);
  }
  out.writeByte(consistencyLevel.id());
  timeout.writeTo(out);
  out.writeString(index);
  out.writeBoolean(canHaveDuplicates);
  if (out.getVersion().onOrAfter(Version.V_2_4_0)) {
    out.writeVLong(routedBasedOnClusterVersion);
  }
}

代码示例来源:origin: org.elasticsearch.module/reindex

@Override
public void writeTo(StreamOutput out) throws IOException {
  super.writeTo(out);
  searchRequest.writeTo(out);
  out.writeBoolean(abortOnVersionConflict);
  out.writeVInt(size);
  out.writeBoolean(refresh);
  timeout.writeTo(out);
  out.writeByte(consistency.id());
  retryBackoffInitialTime.writeTo(out);
  out.writeVInt(maxRetries);
  if (out.getVersion().onOrAfter(Version.V_2_4_0)) {
    out.writeFloat(requestsPerSecond);
  }
}

代码示例来源:origin: harbby/presto-connectors

@Override
public void writeTo(StreamOutput out) throws IOException {
  super.writeTo(out);
  out.writeByte(consistencyLevel.id());
  out.writeString(type);
  out.writeString(id);

相关文章