org.elasticsearch.cluster.ClusterState.writeTo()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(82)

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

ClusterState.writeTo介绍

暂无

代码示例

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

@Override
  public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    this.state.writeTo(out);
  }
}

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

public static byte[] toBytes(ClusterState state) throws IOException {
  BytesStreamOutput os = new BytesStreamOutput();
  state.writeTo(os);
  return BytesReference.toBytes(os.bytes());
}

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

@Override
public void writeTo(StreamOutput out) throws IOException {
  if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
    super.writeTo(out);
    state.writeTo(out);
    RoutingExplanations.writeTo(explanations, out);
  } else {
    if (out.getVersion().onOrAfter(Version.V_6_3_0)) {
      state.writeTo(out);
    } else {
      ClusterModule.filterCustomsForPre63Clients(state).writeTo(out);
    }
    out.writeBoolean(acknowledged);
    RoutingExplanations.writeTo(explanations, out);
  }
}

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

public static BytesReference serializeFullClusterState(ClusterState clusterState, Version nodeVersion) throws IOException {
  BytesStreamOutput bStream = new BytesStreamOutput();
  try (StreamOutput stream = CompressorFactory.COMPRESSOR.streamOutput(bStream)) {
    stream.setVersion(nodeVersion);
    stream.writeBoolean(true);
    clusterState.writeTo(stream);
  }
  return bStream.bytes();
}

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

@Override
public void writeTo(StreamOutput out) throws IOException {
  super.writeTo(out);
  clusterName.writeTo(out);
  if (out.getVersion().onOrAfter(Version.V_6_6_0)) {
    out.writeOptionalWriteable(clusterState);
  } else {
    if (out.getVersion().onOrAfter(Version.V_6_3_0)) {
      clusterState.writeTo(out);
    } else {
      ClusterModule.filterCustomsForPre63Clients(clusterState).writeTo(out);
    }
  }
  if (out.getVersion().onOrAfter(Version.V_6_0_0_alpha1)) {
    totalCompressedSize.writeTo(out);
  }
  if (out.getVersion().onOrAfter(Version.V_6_6_0)) {
    out.writeBoolean(waitForTimedOut);
  }
}

代码示例来源:origin: apache/servicemix-bundles

@Override
  public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    this.state.writeTo(out);
  }
}

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

@Override
  public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    this.state.writeTo(out);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

@Override
  public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    this.state.writeTo(out);
  }
}

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

@Override
  public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    clusterName.writeTo(out);
    clusterState.writeTo(out);
  }
}

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

@Override
  public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    clusterName.writeTo(out);
    clusterState.writeTo(out);
  }
}

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

@Override
  public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    if (out.getVersion().onOrAfter(Version.V_2_2_0)) {
      this.state.writeTo(out);
    }
  }
}

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

@Override
  public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    state.writeTo(out);
    writeAcknowledged(out);
    RoutingExplanations.writeTo(explanations, out);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

public static byte[] toBytes(ClusterState state) throws IOException {
  BytesStreamOutput os = new BytesStreamOutput();
  state.writeTo(os);
  return BytesReference.toBytes(os.bytes());
}

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

public static byte[] toBytes(ClusterState state) throws IOException {
  BytesStreamOutput os = new BytesStreamOutput();
  state.writeTo(os);
  return BytesReference.toBytes(os.bytes());
}

代码示例来源:origin: apache/servicemix-bundles

public static byte[] toBytes(ClusterState state) throws IOException {
  BytesStreamOutput os = new BytesStreamOutput();
  state.writeTo(os);
  return BytesReference.toBytes(os.bytes());
}

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

public static byte[] toBytes(ClusterState state) throws IOException {
  BytesStreamOutput os = new BytesStreamOutput();
  state.writeTo(os);
  return os.bytes().toBytes();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

public static BytesReference serializeFullClusterState(ClusterState clusterState, Version nodeVersion) throws IOException {
  BytesStreamOutput bStream = new BytesStreamOutput();
  try (StreamOutput stream = CompressorFactory.COMPRESSOR.streamOutput(bStream)) {
    stream.setVersion(nodeVersion);
    stream.writeBoolean(true);
    clusterState.writeTo(stream);
  }
  return bStream.bytes();
}

代码示例来源:origin: apache/servicemix-bundles

public static BytesReference serializeFullClusterState(ClusterState clusterState, Version nodeVersion) throws IOException {
  BytesStreamOutput bStream = new BytesStreamOutput();
  try (StreamOutput stream = CompressorFactory.COMPRESSOR.streamOutput(bStream)) {
    stream.setVersion(nodeVersion);
    stream.writeBoolean(true);
    clusterState.writeTo(stream);
  }
  return bStream.bytes();
}

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

public static BytesReference serializeFullClusterState(ClusterState clusterState, Version nodeVersion) throws IOException {
  BytesStreamOutput bStream = new BytesStreamOutput();
  try (StreamOutput stream = CompressorFactory.COMPRESSOR.streamOutput(bStream)) {
    stream.setVersion(nodeVersion);
    stream.writeBoolean(true);
    clusterState.writeTo(stream);
  }
  return bStream.bytes();
}

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

public static BytesReference serializeFullClusterState(ClusterState clusterState, Version nodeVersion) throws IOException {
  BytesStreamOutput bStream = new BytesStreamOutput();
  try (StreamOutput stream = CompressorFactory.defaultCompressor().streamOutput(bStream)) {
    stream.setVersion(nodeVersion);
    stream.writeBoolean(true);
    clusterState.writeTo(stream);
  }
  return bStream.bytes();
}

相关文章