本文整理汇总了Java中org.elasticsearch.Version.writeVersion方法的典型用法代码示例。如果您正苦于以下问题:Java Version.writeVersion方法的具体用法?Java Version.writeVersion怎么用?Java Version.writeVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.elasticsearch.Version
的用法示例。
在下文中一共展示了Version.writeVersion方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeTo
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeString(nodeName);
out.writeString(nodeId);
out.writeString(ephemeralId);
out.writeString(hostName);
out.writeString(hostAddress);
address.writeTo(out);
out.writeVInt(attributes.size());
for (Map.Entry<String, String> entry : attributes.entrySet()) {
out.writeString(entry.getKey());
out.writeString(entry.getValue());
}
out.writeVInt(roles.size());
for (Role role : roles) {
out.writeVInt(role.ordinal());
}
Version.writeVersion(version, out);
}
示例2: writeTo
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeString(name);
out.writeVInt(indices.size());
for (String index : indices) {
out.writeString(index);
}
out.writeByte(state.value());
out.writeOptionalString(reason);
out.writeVLong(startTime);
out.writeVLong(endTime);
out.writeVInt(totalShards);
out.writeVInt(successfulShards);
out.writeVInt(shardFailures.size());
for (SnapshotShardFailure failure : shardFailures) {
failure.writeTo(out);
}
Version.writeVersion(version, out);
}
示例3: writeTo
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
out.writeOptionalWriteable(discoveryNode);
clusterName.writeTo(out);
Version.writeVersion(version, out);
}
示例4: writeTo
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void writeTo(final StreamOutput out) throws IOException {
snapshotId.writeTo(out);
out.writeVInt(indices.size());
for (String index : indices) {
out.writeString(index);
}
if (out.getVersion().before(VERSION_INCOMPATIBLE_INTRODUCED) && state == SnapshotState.INCOMPATIBLE) {
out.writeByte(SnapshotState.FAILED.value());
} else {
out.writeByte(state.value());
}
out.writeOptionalString(reason);
out.writeVLong(startTime);
out.writeVLong(endTime);
out.writeVInt(totalShards);
out.writeVInt(successfulShards);
out.writeVInt(shardFailures.size());
for (SnapshotShardFailure failure : shardFailures) {
failure.writeTo(out);
}
if (out.getVersion().before(VERSION_INCOMPATIBLE_INTRODUCED)) {
Version versionToWrite = version;
if (versionToWrite == null) {
versionToWrite = Version.CURRENT;
}
Version.writeVersion(versionToWrite, out);
} else {
if (version != null) {
out.writeBoolean(true);
Version.writeVersion(version, out);
} else {
out.writeBoolean(false);
}
}
}
示例5: writeTo
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
out.writeVInt(versions.size());
for(Map.Entry<String, Tuple<Version, String>> entry : versions.entrySet()) {
out.writeString(entry.getKey());
Version.writeVersion(entry.getValue().v1(), out);
out.writeString(entry.getValue().v2());
}
writeTimeout(out);
}
示例6: writeTo
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
shardId.writeTo(out);
out.writeBoolean(primary);
Version.writeVersion(upgradeVersion, out);
out.writeString(oldestLuceneSegment.toString());
}
示例7: writeTo
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
out.writeVInt(versions.size());
for(Map.Entry<String, Tuple<Version, String>> entry : versions.entrySet()) {
out.writeString(entry.getKey());
Version.writeVersion(entry.getValue().v1(), out);
out.writeString(entry.getValue().v2());
}
}
示例8: writeTo
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
out.writeString(nodeName);
Version.writeVersion(version, out);
clusterName.writeTo(out);
out.writeString(clusterUuid);
Build.writeBuild(build, out);
out.writeBoolean(available);
}
示例9: writeTo
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeString(id);
if (updateAssignments != null) {
out.writeVInt(updateAssignments.length);
for (Symbol updateAssignment : updateAssignments) {
Symbol.toStream(updateAssignment, out);
}
} else {
out.writeVInt(0);
}
// Stream References
if (insertValues != null) {
out.writeVInt(insertValues.length);
for (int i = 0; i < insertValues.length; i++) {
insertValuesStreamer[i].writeValueTo(out, insertValues[i]);
}
} else {
out.writeVInt(0);
}
Version.writeVersion(Version.fromId((int) version), out);
out.writeByte(versionType.getValue());
out.writeByte(opType.id());
boolean sourceAvailable = source != null;
out.writeBoolean(sourceAvailable);
if (sourceAvailable) {
out.writeBytesReference(source);
}
}
示例10: writeTo
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeString(nodeName);
out.writeString(nodeId);
out.writeString(hostName);
out.writeString(hostAddress);
addressToStream(out, address);
out.writeVInt(attributes.size());
for (Map.Entry<String, String> entry : attributes.entrySet()) {
out.writeString(entry.getKey());
out.writeString(entry.getValue());
}
Version.writeVersion(version, out);
}
示例11: writeTo
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
counts.writeTo(out);
out.writeVInt(versions.size());
for (Version v : versions) Version.writeVersion(v, out);
os.writeTo(out);
process.writeTo(out);
jvm.writeTo(out);
fs.writeTo(out);
out.writeVInt(plugins.size());
for (PluginInfo p : plugins) {
p.writeTo(out);
}
}
示例12: writeAdditionalFields
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
protected void writeAdditionalFields(StreamOutput out) throws IOException {
snapshot.writeTo(out);
Version.writeVersion(version, out);
out.writeString(index);
}
示例13: writeTo
import org.elasticsearch.Version; //导入方法依赖的package包/类
@Override
public void writeTo(StreamOutput out) throws IOException {
snapshotId.writeTo(out);
Version.writeVersion(version, out);
out.writeString(index);
}