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


Java StreamInput.readNamedWriteable方法代码示例

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


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

示例1: readFrom

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    query = in.readNamedWriteable(QueryBuilder.class);

    int typesSize = in.readVInt();
    if (typesSize > 0) {
        types = new String[typesSize];
        for (int i = 0; i < typesSize; i++) {
            types[i] = in.readString();
        }
    }
    filteringAliases = new AliasFilter(in);
    explain = in.readBoolean();
    rewrite = in.readBoolean();
    nowInMillis = in.readVLong();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:18,代码来源:ShardValidateQueryRequest.java

示例2: FunctionScoreQueryBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public FunctionScoreQueryBuilder(StreamInput in) throws IOException {
    super(in);
    query = in.readNamedWriteable(QueryBuilder.class);
    filterFunctionBuilders = in.readList(FilterFunctionBuilder::new).toArray(new FilterFunctionBuilder[0]);
    maxBoost = in.readFloat();
    minScore = in.readOptionalFloat();
    boostMode = in.readOptionalWriteable(CombineFunction::readFromStream);
    scoreMode = FiltersFunctionScoreQuery.ScoreMode.readFromStream(in);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:13,代码来源:FunctionScoreQueryBuilder.java

示例3: InternalHistogram

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Stream from a stream.
 */
public InternalHistogram(StreamInput in) throws IOException {
    super(in);
    order = InternalOrder.Streams.readOrder(in);
    minDocCount = in.readVLong();
    if (minDocCount == 0) {
        emptyBucketInfo = new EmptyBucketInfo(in);
    } else {
        emptyBucketInfo = null;
    }
    format = in.readNamedWriteable(DocValueFormat.class);
    keyed = in.readBoolean();
    buckets = in.readList(stream -> new Bucket(stream, keyed, format));
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:17,代码来源:InternalHistogram.java

示例4: InternalAvg

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public InternalAvg(StreamInput in) throws IOException {
    super(in);
    format = in.readNamedWriteable(DocValueFormat.class);
    sum = in.readDouble();
    count = in.readVLong();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:10,代码来源:InternalAvg.java

示例5: InternalRange

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public InternalRange(StreamInput in) throws IOException {
    super(in);
    format = in.readNamedWriteable(DocValueFormat.class);
    keyed = in.readBoolean();
    int size = in.readVInt();
    List<B> ranges = new ArrayList<>(size);
    for (int i = 0; i < size; i++) {
        String key = in.readOptionalString();
        ranges.add(getFactory().createBucket(key, in.readDouble(), in.readDouble(), in.readVLong(),
                InternalAggregations.readAggregations(in), keyed, format));
    }
    this.ranges = ranges;
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:17,代码来源:InternalRange.java

示例6: marshal

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Since custom metadata can be loaded by a plugin class loader that resides in a sub-node, we need to
 * marshal this object into something the tribe node can work with
 */
private MetaData.Custom marshal(MetaData.Custom custom)  {
    try (BytesStreamOutput bytesStreamOutput = new BytesStreamOutput()){
        bytesStreamOutput.writeNamedWriteable(custom);
        try(StreamInput input = bytesStreamOutput.bytes().streamInput()) {
            StreamInput namedInput = new NamedWriteableAwareStreamInput(input, namedWriteableRegistry);
            MetaData.Custom marshaled = namedInput.readNamedWriteable(MetaData.Custom.class);
            return marshaled;
        }
    } catch (IOException ex) {
        throw new IllegalStateException("cannot marshal object with type " + custom.getWriteableName() + " to tribe node");
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:17,代码来源:TribeService.java

示例7: MovAvgPipelineAggregationBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public MovAvgPipelineAggregationBuilder(StreamInput in) throws IOException {
    super(in, NAME);
    format = in.readOptionalString();
    gapPolicy = GapPolicy.readFrom(in);
    window = in.readVInt();
    model = in.readNamedWriteable(MovAvgModel.class);
    predict = in.readVInt();
    minimize = in.readOptionalBoolean();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:13,代码来源:MovAvgPipelineAggregationBuilder.java

示例8: NestedQueryBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public NestedQueryBuilder(StreamInput in) throws IOException {
    super(in);
    path = in.readString();
    scoreMode = ScoreMode.values()[in.readVInt()];
    query = in.readNamedWriteable(QueryBuilder.class);
    innerHitBuilder = in.readOptionalWriteable(InnerHitBuilder::new);
    ignoreUnmapped = in.readBoolean();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:12,代码来源:NestedQueryBuilder.java

示例9: InternalBucketMetricValue

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public InternalBucketMetricValue(StreamInput in) throws IOException {
    super(in);
    format = in.readNamedWriteable(DocValueFormat.class);
    value = in.readDouble();
    keys = in.readStringArray();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:10,代码来源:InternalBucketMetricValue.java

示例10: HasParentQueryBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public HasParentQueryBuilder(StreamInput in) throws IOException {
    super(in);
    type = in.readString();
    score = in.readBoolean();
    query = in.readNamedWriteable(QueryBuilder.class);
    innerHit = in.readOptionalWriteable(InnerHitBuilder::new);
    ignoreUnmapped = in.readBoolean();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:12,代码来源:HasParentQueryBuilder.java

示例11: BucketScriptPipelineAggregator

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
@SuppressWarnings("unchecked")
public BucketScriptPipelineAggregator(StreamInput in) throws IOException {
    super(in);
    script = new Script(in);
    formatter = in.readNamedWriteable(DocValueFormat.class);
    gapPolicy = GapPolicy.readFrom(in);
    bucketsPathsMap = (Map<String, String>) in.readGenericValue();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:12,代码来源:BucketScriptPipelineAggregator.java

示例12: InternalMappedSignificantTerms

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
protected InternalMappedSignificantTerms(StreamInput in, Bucket.Reader<B> bucketReader) throws IOException {
    super(in);
    format = in.readNamedWriteable(DocValueFormat.class);
    subsetSize = in.readVLong();
    supersetSize = in.readVLong();
    significanceHeuristic = in.readNamedWriteable(SignificanceHeuristic.class);
    buckets = in.readList(stream -> bucketReader.read(stream, subsetSize, supersetSize, format));
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:InternalMappedSignificantTerms.java

示例13: InternalHyperUniqueSum

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public InternalHyperUniqueSum(StreamInput in) throws IOException {
    super(in);
    format = in.readNamedWriteable(DocValueFormat.class);
    hyperLogLogPlusBytes = in.readByteArray();
}
 
开发者ID:bazaarvoice,项目名称:elasticsearch-hyperloglog,代码行数:6,代码来源:InternalHyperUniqueSum.java

示例14: FilterFunctionBuilder

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public FilterFunctionBuilder(StreamInput in) throws IOException {
    filter = in.readNamedWriteable(QueryBuilder.class);
    scoreFunction = in.readNamedWriteable(ScoreFunctionBuilder.class);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:8,代码来源:FunctionScoreQueryBuilder.java

示例15: InternalMin

import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
 * Read from a stream.
 */
public InternalMin(StreamInput in) throws IOException {
    super(in);
    format = in.readNamedWriteable(DocValueFormat.class);
    min = in.readDouble();
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:9,代码来源:InternalMin.java


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