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