當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。