当前位置: 首页>>代码示例>>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;未经允许,请勿转载。