public class InternalRange<B extends InternalRange.Bucket,R extends InternalRange<B,R>> extends InternalMultiBucketAggregation<R,B> implements Range
Modifier and Type | Class and Description |
---|---|
static class |
InternalRange.Bucket |
static class |
InternalRange.Factory<B extends InternalRange.Bucket,R extends InternalRange<B,R>> |
InternalMultiBucketAggregation.InternalBucket
InternalAggregation.CommonFields, InternalAggregation.ReduceContext, InternalAggregation.Type
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
protected ValueFormatter |
formatter |
protected boolean |
keyed |
static InternalAggregation.Type |
TYPE |
metaData, name
EMPTY_PARAMS
Constructor and Description |
---|
InternalRange() |
InternalRange(String name,
List<B> ranges,
ValueFormatter formatter,
boolean keyed,
List<PipelineAggregator> pipelineAggregators,
Map<String,Object> metaData) |
Modifier and Type | Method and Description |
---|---|
R |
create(List<B> buckets)
Create a new copy of this
Aggregation with the same settings as
this Aggregation and contains the provided buckets. |
B |
createBucket(InternalAggregations aggregations,
B prototype)
Create a new
InternalMultiBucketAggregation.InternalBucket using the provided prototype bucket
and aggregations. |
protected void |
doReadFrom(StreamInput in) |
InternalAggregation |
doReduce(List<InternalAggregation> aggregations,
InternalAggregation.ReduceContext reduceContext) |
protected void |
doWriteTo(StreamOutput out) |
XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
List<B> |
getBuckets()
Return the buckets of this range aggregation.
|
InternalRange.Factory<B,R> |
getFactory() |
static void |
registerStream() |
InternalAggregation.Type |
type() |
getProperty
getMetaData, getName, getProperty, pipelineAggregators, readFrom, readSize, reduce, toXContent, writeSize, writeTo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMetaData, getName, getProperty
public static final InternalAggregation.Type TYPE
protected ValueFormatter formatter
protected boolean keyed
public InternalRange()
public InternalRange(String name, List<B> ranges, ValueFormatter formatter, boolean keyed, List<PipelineAggregator> pipelineAggregators, Map<String,Object> metaData)
public static void registerStream()
public InternalAggregation.Type type()
type
in class InternalAggregation
InternalAggregation.Type
of this aggregationpublic List<B> getBuckets()
Range
getBuckets
in interface MultiBucketsAggregation
getBuckets
in interface Range
public InternalRange.Factory<B,R> getFactory()
public R create(List<B> buckets)
InternalMultiBucketAggregation
Aggregation
with the same settings as
this Aggregation
and contains the provided buckets.create
in class InternalMultiBucketAggregation<R extends InternalRange<B,R>,B extends InternalRange.Bucket>
buckets
- the buckets to use in the new Aggregation
Aggregation
public B createBucket(InternalAggregations aggregations, B prototype)
InternalMultiBucketAggregation
InternalMultiBucketAggregation.InternalBucket
using the provided prototype bucket
and aggregations.createBucket
in class InternalMultiBucketAggregation<R extends InternalRange<B,R>,B extends InternalRange.Bucket>
aggregations
- the aggregations for the new bucketprototype
- the bucket to use as a prototypepublic InternalAggregation doReduce(List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
doReduce
in class InternalAggregation
protected void doReadFrom(StreamInput in) throws IOException
doReadFrom
in class InternalAggregation
IOException
protected void doWriteTo(StreamOutput out) throws IOException
doWriteTo
in class InternalAggregation
IOException
public XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException
doXContentBody
in class InternalAggregation
IOException
Copyright © 2009–2016. All rights reserved.