當前位置: 首頁>>代碼示例>>Java>>正文


Java StreamOutput.writeVInt方法代碼示例

本文整理匯總了Java中org.elasticsearch.common.io.stream.StreamOutput.writeVInt方法的典型用法代碼示例。如果您正苦於以下問題:Java StreamOutput.writeVInt方法的具體用法?Java StreamOutput.writeVInt怎麽用?Java StreamOutput.writeVInt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.elasticsearch.common.io.stream.StreamOutput的用法示例。


在下文中一共展示了StreamOutput.writeVInt方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeString(nodeId);
    out.writeVInt(totalShards);
    out.writeVInt(results.size());
    for (ShardOperationResult result : results) {
        out.writeOptionalStreamable(result);
    }
    out.writeBoolean(exceptions != null);
    if (exceptions != null) {
        int failureShards = exceptions.size();
        out.writeVInt(failureShards);
        for (int i = 0; i < failureShards; i++) {
            exceptions.get(i).writeTo(out);
        }
    }
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:19,代碼來源:TransportBroadcastByNodeAction.java

示例2: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeString(name);
    out.writeVInt(values.size());
    for (Object obj : values) {
        out.writeGenericValue(obj);
    }
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:9,代碼來源:GetField.java

示例3: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeString(index);
    out.writeVInt(shardId);
    out.writeString(node);
    out.writeBoolean(allowPrimary);
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:8,代碼來源:CancelAllocationCommand.java

示例4: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeOptionalWriteable(allocationDecision);
    out.writeOptionalWriteable(canRemainDecision);
    out.writeOptionalWriteable(clusterRebalanceDecision);
    out.writeVInt(currentNodeRanking);
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:9,代碼來源:MoveDecision.java

示例5: doWriteTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
@Override
protected void doWriteTo(StreamOutput out) throws IOException {
    ValueFormatterStreams.writeOptional(formatter, out);
    writeSize(requiredSize, out);
    out.writeVLong(minDocCount);
    out.writeVLong(subsetSize);
    out.writeVLong(supersetSize);
    significanceHeuristic.writeTo(out);
    out.writeVInt(buckets.size());
    for (InternalSignificantTerms.Bucket bucket : buckets) {

        bucket.writeTo(out);
    }
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:15,代碼來源:SignificantLongTerms.java

示例6: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeInt(id);
    out.writeVInt(pingResponses.length);
    for (PingResponse pingResponse : pingResponses) {
        pingResponse.writeTo(out);
    }
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:10,代碼來源:UnicastZenPing.java

示例7: writeExplanation

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
public static void writeExplanation(StreamOutput out, Explanation explanation) throws IOException {
    out.writeBoolean(explanation.isMatch());
    out.writeString(explanation.getDescription());
    Explanation[] subExplanations = explanation.getDetails();
    out.writeVInt(subExplanations.length);
    for (Explanation subExp : subExplanations) {
        writeExplanation(out, subExp);
    }
    if (explanation.isMatch()) {
        out.writeFloat(explanation.getValue());
    }
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:13,代碼來源:Lucene.java

示例8: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeVInt(shards.length);
    for (ShardStats shard : shards) {
        shard.writeTo(out);
    }
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:9,代碼來源:IndexShardStatsResponse.java

示例9: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeString(name);
    out.writeVInt(values.size());
    for (Object value : values) {
        out.writeGenericValue(value);
    }
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:9,代碼來源:InternalSearchHitField.java

示例10: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    out.writeOptionalString(routing);
    out.writeLong(jobId.getMostSignificantBits());
    out.writeLong(jobId.getLeastSignificantBits());
    out.writeVInt(locations.size());
    for (int i = 0; i < locations.size(); i++) {
        out.writeVInt(locations.get(i));
    }
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:12,代碼來源:ShardRequest.java

示例11: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeVInt(id);
    out.writeString(description);
    out.writeVInt(levels.size());
    for (ClusterBlockLevel level : levels) {
        out.writeVInt(level.id());
    }
    out.writeBoolean(retryable);
    out.writeBoolean(disableStatePersistence);
    RestStatus.writeTo(out, status);
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:13,代碼來源:ClusterBlock.java

示例12: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
@Override
public void writeTo(StreamOutput out) throws IOException {
    out.writeText(text);
    out.writeVInt(offset);
    out.writeVInt(length);
    out.writeVInt(options.size());
    for (Option option : options) {
        option.writeTo(out);
    }
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:11,代碼來源:Suggest.java

示例13: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    if (indices == null) {
        out.writeVInt(0);
    } else {
        out.writeVInt(indices.length);
        for (String index : indices) {
            out.writeString(index);
        }
    }
    timeout.writeTo(out);
    if (waitForStatus == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        out.writeByte(waitForStatus.value());
    }
    out.writeInt(waitForRelocatingShards);
    out.writeInt(waitForActiveShards);
    out.writeString(waitForNodes);
    if (waitForEvents == null) {
        out.writeBoolean(false);
    } else {
        out.writeBoolean(true);
        Priority.writeTo(waitForEvents, out);
    }
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:29,代碼來源:ClusterHealthRequest.java

示例14: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
@Override
public final void writeTo(StreamOutput out) throws IOException {
    out.writeString(name);
    out.writeGenericValue(metaData);
    out.writeVInt(pipelineAggregators.size());
    for (PipelineAggregator pipelineAggregator : pipelineAggregators) {
        out.writeBytesReference(pipelineAggregator.type().stream());
        pipelineAggregator.writeTo(out);
    }
    doWriteTo(out);
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:12,代碼來源:InternalAggregation.java

示例15: writeTo

import org.elasticsearch.common.io.stream.StreamOutput; //導入方法依賴的package包/類
@Override
public void writeTo(StreamOutput out) throws IOException {
    super.writeTo(out);
    if (tokens != null) {
        out.writeVInt(tokens.size());
        for (AnalyzeToken token : tokens) {
            token.writeTo(out);
        }
    } else {
        out.writeVInt(0);
    }
    if (out.getVersion().onOrAfter(Version.V_2_2_0)) {
        out.writeOptionalStreamable(detail);
    }
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:16,代碼來源:AnalyzeResponse.java


注:本文中的org.elasticsearch.common.io.stream.StreamOutput.writeVInt方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。