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