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.InternalBucketInternalAggregation.CommonFields, InternalAggregation.ReduceContext, InternalAggregation.TypeToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
protected ValueFormatter |
formatter |
protected boolean |
keyed |
static InternalAggregation.Type |
TYPE |
metaData, nameEMPTY_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() |
getPropertygetMetaData, getName, getProperty, pipelineAggregators, readFrom, readSize, reduce, toXContent, writeSize, writeToclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMetaData, getName, getPropertypublic 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 InternalAggregationInternalAggregation.Type of this aggregationpublic List<B> getBuckets()
RangegetBuckets in interface MultiBucketsAggregationgetBuckets in interface Rangepublic InternalRange.Factory<B,R> getFactory()
public R create(List<B> buckets)
InternalMultiBucketAggregationAggregation 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 AggregationAggregationpublic B createBucket(InternalAggregations aggregations, B prototype)
InternalMultiBucketAggregationInternalMultiBucketAggregation.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 InternalAggregationprotected void doReadFrom(StreamInput in) throws IOException
doReadFrom in class InternalAggregationIOExceptionprotected void doWriteTo(StreamOutput out) throws IOException
doWriteTo in class InternalAggregationIOExceptionpublic XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException
doXContentBody in class InternalAggregationIOExceptionCopyright © 2009–2017. All rights reserved.