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


Java StreamInput.readOptionalVInt方法代码示例

本文整理汇总了Java中org.elasticsearch.common.io.stream.StreamInput.readOptionalVInt方法的典型用法代码示例。如果您正苦于以下问题:Java StreamInput.readOptionalVInt方法的具体用法?Java StreamInput.readOptionalVInt怎么用?Java StreamInput.readOptionalVInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.elasticsearch.common.io.stream.StreamInput的用法示例。


在下文中一共展示了StreamInput.readOptionalVInt方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: DirectCandidateGeneratorBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public DirectCandidateGeneratorBuilder(StreamInput in) throws IOException {
    field = in.readString();
    suggestMode = in.readOptionalString();
    accuracy = in.readOptionalFloat();
    size = in.readOptionalVInt();
    sort = in.readOptionalString();
    stringDistance = in.readOptionalString();
    maxEdits = in.readOptionalVInt();
    maxInspections = in.readOptionalVInt();
    maxTermFreq = in.readOptionalFloat();
    prefixLength = in.readOptionalVInt();
    minWordLength = in.readOptionalVInt();
    minDocFreq = in.readOptionalFloat();
    preFilter = in.readOptionalString();
    postFilter = in.readOptionalString();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:20,代码来源:DirectCandidateGeneratorBuilder.java

示例2: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    term = in.readString();
    startOffset = in.readInt();
    endOffset = in.readInt();
    position = in.readVInt();
    if (in.getVersion().onOrAfter(Version.V_5_2_0_UNRELEASED)) {
        Integer len = in.readOptionalVInt();
        if (len != null) {
            positionLength = len;
        } else {
            positionLength = 1;
        }
    }
    type = in.readOptionalString();
    if (in.getVersion().onOrAfter(Version.V_2_2_0)) {
        attributes = (Map<String, Object>) in.readGenericValue();
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:20,代码来源:AnalyzeResponse.java

示例3: Status

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public Status(StreamInput in) throws IOException {
    if (in.getVersion().onOrAfter(Version.V_5_1_1_UNRELEASED)) {
        sliceId = in.readOptionalVInt();
    } else {
        sliceId = null;
    }
    total = in.readVLong();
    updated = in.readVLong();
    created = in.readVLong();
    deleted = in.readVLong();
    batches = in.readVInt();
    versionConflicts = in.readVLong();
    noops = in.readVLong();
    bulkRetries = in.readVLong();
    searchRetries = in.readVLong();
    throttled = new TimeValue(in);
    requestsPerSecond = in.readFloat();
    reasonCancelled = in.readOptionalString();
    throttledUntil = new TimeValue(in);
    if (in.getVersion().onOrAfter(Version.V_5_1_1_UNRELEASED)) {
        sliceStatuses = in.readList(stream -> stream.readOptionalWriteable(StatusOrException::new));
    } else {
        sliceStatuses = emptyList();
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:26,代码来源:BulkByScrollTask.java

示例4: PhraseSuggestionBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public PhraseSuggestionBuilder(StreamInput in) throws IOException {
    super(in);
    maxErrors = in.readFloat();
    realWordErrorLikelihood = in.readFloat();
    confidence = in.readFloat();
    gramSize = in.readOptionalVInt();
    model = in.readOptionalNamedWriteable(SmoothingModel.class);
    forceUnigrams = in.readBoolean();
    tokenLimit = in.readVInt();
    preTag = in.readOptionalString();
    postTag = in.readOptionalString();
    separator = in.readString();
    if (in.readBoolean()) {
        collateQuery = new Script(in);
    }
    collateParams = in.readMap();
    collatePrune = in.readOptionalBoolean();
    int generatorsEntries = in.readVInt();
    for (int i = 0; i < generatorsEntries; i++) {
        String type = in.readString();
        int numberOfGenerators = in.readVInt();
        List<CandidateGenerator> generatorsList = new ArrayList<>(numberOfGenerators);
        for (int g = 0; g < numberOfGenerators; g++) {
            DirectCandidateGeneratorBuilder generator = new DirectCandidateGeneratorBuilder(in);
            generatorsList.add(generator);
        }
        generators.put(type, generatorsList);
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:33,代码来源:PhraseSuggestionBuilder.java

示例5: SuggestionBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
protected SuggestionBuilder(StreamInput in) throws IOException {
    field = in.readString();
    text = in.readOptionalString();
    prefix = in.readOptionalString();
    regex = in.readOptionalString();
    analyzer = in.readOptionalString();
    size = in.readOptionalVInt();
    shardSize = in.readOptionalVInt();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:13,代码来源:SuggestionBuilder.java

示例6: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    checkVersion(in.getVersion());
    super.readFrom(in);
    this.index = in.readOptionalString();
    this.shard = in.readOptionalVInt();
    this.primary = in.readOptionalBoolean();
    this.currentNode = in.readOptionalString();
    this.includeYesDecisions = in.readBoolean();
    this.includeDiskInfo = in.readBoolean();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:12,代码来源:ClusterAllocationExplainRequest.java

示例7: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public void readFrom(StreamInput in) throws IOException {
    maxNumTerms = in.readOptionalVInt();
    minTermFreq = in.readOptionalVInt();
    maxTermFreq = in.readOptionalVInt();
    minDocFreq = in.readOptionalVInt();
    maxDocFreq = in.readOptionalVInt();
    minWordLength = in.readOptionalVInt();
    maxWordLength = in.readOptionalVInt();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:10,代码来源:TermVectorsRequest.java

示例8: SearchFailure

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public SearchFailure(StreamInput in) throws IOException {
    reason = in.readException();
    index = in.readOptionalString();
    shardId = in.readOptionalVInt();
    nodeId = in.readOptionalString();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:10,代码来源:ScrollableHitSource.java

示例9: RescoreBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
protected RescoreBuilder(StreamInput in) throws IOException {
    windowSize = in.readOptionalVInt();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:7,代码来源:RescoreBuilder.java


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