当前位置: 首页>>代码示例>>Java>>正文


Java Version.writeVersion方法代码示例

本文整理汇总了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);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:20,代码来源:DiscoveryNode.java

示例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);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:20,代码来源:SnapshotInfo.java

示例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);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:TransportService.java

示例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);
        }
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:37,代码来源:SnapshotInfo.java

示例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);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:12,代码来源:UpgradeSettingsRequest.java

示例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());
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:ShardUpgradeResult.java

示例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());
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:11,代码来源:UpgradeResponse.java

示例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);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:11,代码来源:MainResponse.java

示例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);
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:31,代码来源:ShardUpsertRequest.java

示例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);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:15,代码来源:DiscoveryNode.java

示例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);
    }
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:15,代码来源:ClusterStatsNodes.java

示例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);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:7,代码来源:RecoverySource.java

示例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);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:7,代码来源:RestoreSource.java


注:本文中的org.elasticsearch.Version.writeVersion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。