本文整理了Java中org.elasticsearch.Version.onOrAfter()
方法的一些代码示例,展示了Version.onOrAfter()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.onOrAfter()
方法的具体详情如下:
包路径:org.elasticsearch.Version
类名称:Version
方法名:onOrAfter
暂无
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
protected void writeAdditionalFields(StreamOutput out) throws IOException {
if (out.getVersion().onOrAfter(Version.V_6_5_0)) {
out.writeBoolean(bootstrapNewHistoryUUID);
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public void readFrom(final StreamInput in) throws IOException {
// before 6.0.0 we received an empty response so we have to maintain that
if (in.getVersion().onOrAfter(Version.V_6_0_0_alpha1)) {
localCheckpoint = in.readZLong();
}
else {
localCheckpoint = SequenceNumbers.UNASSIGNED_SEQ_NO;
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public void writeTo(final StreamOutput out) throws IOException {
// before 6.0.0 we responded with an empty response so we have to maintain that
if (out.getVersion().onOrAfter(Version.V_6_0_0_alpha1)) {
out.writeZLong(localCheckpoint);
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
private ExistingStoreRecoverySource(StreamInput in) throws IOException {
if (in.getVersion().onOrAfter(Version.V_6_5_0)) {
bootstrapNewHistoryUUID = in.readBoolean();
} else {
bootstrapNewHistoryUUID = false;
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
if (out.getVersion().onOrAfter(Version.V_6_0_0_alpha1)) {
out.writeZLong(localCheckpoint);
}
if (out.getVersion().onOrAfter(Version.V_6_0_0_rc1)) {
out.writeZLong(globalCheckpoint);
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
public DiscoveryStats(StreamInput in) throws IOException {
queueStats = in.readOptionalWriteable(PendingClusterStateStats::new);
if (in.getVersion().onOrAfter(Version.V_6_1_0)) {
publishStats = in.readOptionalWriteable(PublishClusterStateStats::new);
} else {
publishStats = null;
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
if (out.getVersion().onOrAfter(Version.V_6_0_0_alpha1)) {
out.writeZLong(globalCheckpoint);
}
if (out.getVersion().onOrAfter(Version.V_6_5_0)) {
out.writeZLong(maxSeqNoOfUpdatesOrDeletes);
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
if (in.getVersion().onOrAfter(Version.V_6_1_0)) {
readShardsAcknowledged(in);
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeArray(Lucene::writeSortValue, this.formattedSortValues);
if (out.getVersion().onOrAfter(Version.V_6_6_0)) {
out.writeArray(Lucene::writeSortValue, this.rawSortValues);
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
/** Serialization constructor. */
public FieldAndFormat(StreamInput in) throws IOException {
this.field = in.readString();
if (in.getVersion().onOrAfter(Version.V_6_4_0)) {
format = in.readOptionalString();
} else {
format = null;
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
if (out.getVersion().onOrAfter(Version.V_6_1_0)) {
writeShardsAcknowledged(out);
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
if (in.getVersion().onOrAfter(Version.V_6_1_0)) {
skipDuplicates = in.readBoolean();
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
if (out.getVersion().onOrAfter(Version.V_6_1_0)) {
out.writeBoolean(skipDuplicates);
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
SearchSortValues(StreamInput in) throws IOException {
this.formattedSortValues = in.readArray(Lucene::readSortValue, Object[]::new);
if (in.getVersion().onOrAfter(Version.V_6_6_0)) {
this.rawSortValues = in.readArray(Lucene::readSortValue, Object[]::new);
} else {
this.rawSortValues = EMPTY_ARRAY;
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeOptionalWriteable(queueStats);
if (out.getVersion().onOrAfter(Version.V_6_1_0)) {
out.writeOptionalWriteable(publishStats);
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
this.responseMap =
in.readMap(StreamInput::readString, FieldCapabilitiesResponse::readField);
if (in.getVersion().onOrAfter(Version.V_5_5_0)) {
indexResponses = in.readList(FieldCapabilitiesIndexResponse::new);
} else {
indexResponses = Collections.emptyList();
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public void writeTo(final StreamOutput out) throws IOException {
super.writeTo(out);
if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
out.writeZLong(trimAboveSeqNo);
}
if (out.getVersion().onOrAfter(Version.V_6_5_0)) {
out.writeZLong(maxSeenAutoIdTimestampOnPrimary);
}
out.writeArray(Translog.Operation::writeOperation, operations);
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
if (in.getVersion().onOrAfter(Version.V_6_4_0)) {
this.nodes = in.readList(NodeView::new).stream().map(n -> n.convertToDiscoveryNode()).collect(Collectors.toList());
} else {
clusterName = new ClusterName(in);
this.nodes = in.readList(DiscoveryNode::new);
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
protected static void writeCoordinateTo(Coordinate coordinate, StreamOutput out) throws IOException {
out.writeDouble(coordinate.x);
out.writeDouble(coordinate.y);
if (out.getVersion().onOrAfter(Version.V_6_3_0)) {
out.writeOptionalDouble(Double.isNaN(coordinate.z) ? null : coordinate.z);
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
@Override
public void readFrom(StreamInput in) throws IOException {
total = in.readVLong();
totalTimeInMillis = in.readVLong();
if (in.getVersion().onOrAfter(Version.V_6_3_0)) {
periodic = in.readVLong();
}
}
内容来源于网络,如有侵权,请联系作者删除!