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


Java StreamInput.readOptionalString方法代碼示例

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


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

示例1: MappingMetaData

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
public MappingMetaData(StreamInput in) throws IOException {
    type = in.readString();
    source = CompressedXContent.readCompressedString(in);
    // routing
    routing = new Routing(in.readBoolean());
    if (in.getVersion().before(Version.V_6_0_0_alpha1_UNRELEASED)) {
        // timestamp
        boolean enabled = in.readBoolean();
        if (enabled) {
            throw new IllegalArgumentException("_timestamp may not be enabled");
        }
        in.readString(); // format
        in.readOptionalString(); // defaultTimestamp
        in.readOptionalBoolean(); // ignoreMissing
    }
    hasParentField = in.readBoolean();
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:18,代碼來源:MappingMetaData.java

示例2: Bucket

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
private Bucket(StreamInput in, DocValueFormat format, boolean keyed) throws IOException {
    this.format = format;
    this.keyed = keyed;
    key = in.readOptionalString();
    if (in.readBoolean()) {
        from = in.readBytesRef();
    } else {
        from = null;
    }
    if (in.readBoolean()) {
        to = in.readBytesRef();
    } else {
        to = null;
    }
    docCount = in.readLong();
    aggregations = InternalAggregations.readAggregations(in);
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:18,代碼來源:InternalBinaryRange.java

示例3: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    this.pipelineId = in.readOptionalString();
    boolean verbose = in.readBoolean();
    int responsesLength = in.readVInt();
    results = new ArrayList<>();
    for (int i = 0; i < responsesLength; i++) {
        SimulateDocumentResult simulateDocumentResult;
        if (verbose) {
            simulateDocumentResult = new SimulateDocumentVerboseResult(in);
        } else {
            simulateDocumentResult = new SimulateDocumentBaseResult(in);
        }
        results.add(simulateDocumentResult);
    }
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:18,代碼來源:SimulatePipelineResponse.java

示例4: DerivativePipelineAggregationBuilder

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
 * Read from a stream.
 */
public DerivativePipelineAggregationBuilder(StreamInput in) throws IOException {
    super(in, NAME);
    format = in.readOptionalString();
    if (in.readBoolean()) {
        gapPolicy = GapPolicy.readFrom(in);
    }
    units = in.readOptionalString();
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:12,代碼來源:DerivativePipelineAggregationBuilder.java

示例5: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    startTime = in.readVLong();
    documentType = in.readString();
    routing = in.readOptionalString();
    preference = in.readOptionalString();
    source = in.readBytesReference();
    docSource = in.readBytesReference();
    if (in.readBoolean()) {
        getRequest = new GetRequest(null);
        getRequest.readFrom(in);
    }
    onlyCount = in.readBoolean();
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:16,代碼來源:PercolateRequest.java

示例6: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    index = in.readString();
    type = in.readOptionalString();
    id = in.readString();
    throwable = in.readThrowable();
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:8,代碼來源:MultiGetResponse.java

示例7: read

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
 * Read from a stream.
 */
@SuppressWarnings("unchecked")
private void read(StreamInput in) throws IOException {
    fields = (ArrayList<String>)in.readGenericValue();
    valueType = in.readOptionalWriteable(ValueType::readFromStream);
    format = in.readOptionalString();
    missingMap = in.readMap();
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:11,代碼來源:MultiValuesSourceAggregationBuilder.java

示例8: SnapshotInfo

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
 * Constructs snapshot information from stream input
 */
public SnapshotInfo(final StreamInput in) throws IOException {
    snapshotId = new SnapshotId(in);
    int size = in.readVInt();
    List<String> indicesListBuilder = new ArrayList<>();
    for (int i = 0; i < size; i++) {
        indicesListBuilder.add(in.readString());
    }
    indices = Collections.unmodifiableList(indicesListBuilder);
    state = SnapshotState.fromValue(in.readByte());
    reason = in.readOptionalString();
    startTime = in.readVLong();
    endTime = in.readVLong();
    totalShards = in.readVInt();
    successfulShards = in.readVInt();
    size = in.readVInt();
    if (size > 0) {
        List<SnapshotShardFailure> failureBuilder = new ArrayList<>();
        for (int i = 0; i < size; i++) {
            failureBuilder.add(SnapshotShardFailure.readSnapshotShardFailure(in));
        }
        shardFailures = Collections.unmodifiableList(failureBuilder);
    } else {
        shardFailures = Collections.emptyList();
    }
    if (in.getVersion().before(VERSION_INCOMPATIBLE_INTRODUCED)) {
        version = Version.readVersion(in);
    } else {
        version = in.readBoolean() ? Version.readVersion(in) : null;
    }
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:34,代碼來源:SnapshotInfo.java

示例9: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    indices = in.readStringArray();
    indicesOptions = IndicesOptions.readIndicesOptions(in);
    type = in.readOptionalString();
    source = in.readString();
    if (in.getVersion().before(Version.V_6_0_0_alpha1_UNRELEASED)) { // TODO change to V_5_3 once backported
        // we do not know the format from earlier versions so convert if necessary
        source = XContentHelper.convertToJson(new BytesArray(source), false, false, XContentFactory.xContentType(source));
    }
    updateAllTypes = in.readBoolean();
    readTimeout(in);
    concreteIndex = in.readOptionalWriteable(Index::new);
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:16,代碼來源:PutMappingRequest.java

示例10: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    int size = in.readVInt();
    locations = new IntArrayList(size);
    requests = new ArrayList<>(size);
    for (int i = 0; i < size; i++) {
        locations.add(in.readVInt());
        requests.add(TermVectorsRequest.readTermVectorsRequest(in));
    }

    preference = in.readOptionalString();
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:14,代碼來源:MultiTermVectorsShardRequest.java

示例11: WildcardQueryBuilder

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
 * Read from a stream.
 */
public WildcardQueryBuilder(StreamInput in) throws IOException {
    super(in);
    fieldName = in.readString();
    value = in.readString();
    rewrite = in.readOptionalString();
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:10,代碼來源:WildcardQueryBuilder.java

示例12: MatchPhrasePrefixQueryBuilder

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
 * Read from a stream.
 */
public MatchPhrasePrefixQueryBuilder(StreamInput in) throws IOException {
    super(in);
    fieldName = in.readString();
    value = in.readGenericValue();
    slop = in.readVInt();
    maxExpansions = in.readVInt();
    analyzer = in.readOptionalString();
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:12,代碼來源:MatchPhrasePrefixQueryBuilder.java

示例13: DiversifiedAggregationBuilder

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
 * Read from a stream.
 */
public DiversifiedAggregationBuilder(StreamInput in) throws IOException {
    super(in, ValuesSourceType.ANY, null);
    shardSize = in.readVInt();
    maxDocsPerValue = in.readVInt();
    executionHint = in.readOptionalString();
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:10,代碼來源:DiversifiedAggregationBuilder.java

示例14: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
@Override
public void readFrom(StreamInput in) throws IOException {
    index = in.readString();
    shardId = in.readVInt();
    nodeId = in.readOptionalString();
    cause = in.readThrowable();
    status = RestStatus.readFrom(in);
    primary = in.readBoolean();
}
 
開發者ID:baidu,項目名稱:Elasticsearch,代碼行數:10,代碼來源:ActionWriteResponse.java

示例15: ScriptSortBuilder

import org.elasticsearch.common.io.stream.StreamInput; //導入方法依賴的package包/類
/**
 * Read from a stream.
 */
public ScriptSortBuilder(StreamInput in) throws IOException {
    script = new Script(in);
    type = ScriptSortType.readFromStream(in);
    order = SortOrder.readFromStream(in);
    sortMode = in.readOptionalWriteable(SortMode::readFromStream);
    nestedPath = in.readOptionalString();
    nestedFilter = in.readOptionalNamedWriteable(QueryBuilder.class);
}
 
開發者ID:justor,項目名稱:elasticsearch_my,代碼行數:12,代碼來源:ScriptSortBuilder.java


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