Class AbstractPipelineAggregationBuilder<PAB extends AbstractPipelineAggregationBuilder<PAB>>
- java.lang.Object
-
- org.elasticsearch.search.aggregations.PipelineAggregationBuilder
-
- org.elasticsearch.search.aggregations.pipeline.AbstractPipelineAggregationBuilder<PAB>
-
- All Implemented Interfaces:
NamedWriteable,Writeable,ToXContent,ToXContentFragment,BaseAggregationBuilder
- Direct Known Subclasses:
BucketMetricsPipelineAggregationBuilder,BucketScriptPipelineAggregationBuilder,BucketSelectorPipelineAggregationBuilder,BucketSortPipelineAggregationBuilder,CumulativeSumPipelineAggregationBuilder,DerivativePipelineAggregationBuilder,MovAvgPipelineAggregationBuilder,MovFnPipelineAggregationBuilder,SerialDiffPipelineAggregationBuilder
public abstract class AbstractPipelineAggregationBuilder<PAB extends AbstractPipelineAggregationBuilder<PAB>> extends PipelineAggregationBuilder
Base implementation of aPipelineAggregationBuilder.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
Fields Modifier and Type Field Description static ParseFieldBUCKETS_PATH_FIELDField shared by many parsers.protected java.util.Map<java.lang.String,java.lang.Object>metaDataprotected java.lang.Stringtype-
Fields inherited from class org.elasticsearch.search.aggregations.PipelineAggregationBuilder
bucketsPaths, name
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPipelineAggregationBuilder(java.lang.String name, java.lang.String type, java.lang.String[] bucketsPaths)protectedAbstractPipelineAggregationBuilder(StreamInput in, java.lang.String type)Read from a stream.
-
Method Summary
Modifier and Type Method Description PipelineAggregatorcreate()Creates the pipeline aggregatorprotected abstract PipelineAggregatorcreateInternal(java.util.Map<java.lang.String,java.lang.Object> metaData)protected abstract booleandoEquals(java.lang.Object obj)protected abstract intdoHashCode()voiddoValidate(AggregatorFactory<?> parent, java.util.Collection<AggregationBuilder> factories, java.util.Collection<PipelineAggregationBuilder> pipelineAggregatorFactories)protected abstract voiddoWriteTo(StreamOutput out)booleanequals(java.lang.Object obj)java.lang.StringgetType()The name of the type of aggregation built by this builder.inthashCode()protected abstract XContentBuilderinternalXContent(XContentBuilder builder, ToXContent.Params params)protected booleanoverrideBucketsPath()PABsetMetaData(java.util.Map<java.lang.String,java.lang.Object> metaData)Associate metadata with thisPipelineAggregationBuilder.XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)java.lang.Stringtype()voidvalidate(AggregatorFactory<?> parent, java.util.Collection<AggregationBuilder> factories, java.util.Collection<PipelineAggregationBuilder> pipelineAggregatorFactories)Validates the state of this factory (makes sure the factory is properly configured)static voidvalidateSequentiallyOrderedParentAggs(AggregatorFactory<?> parent, java.lang.String type, java.lang.String name)Validates pipeline aggregations that need sequentially ordered data.voidwriteTo(StreamOutput out)Write this into the StreamOutput.-
Methods inherited from class org.elasticsearch.search.aggregations.PipelineAggregationBuilder
getBucketsPaths, getName, subAggregations, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableName
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Field Detail
-
BUCKETS_PATH_FIELD
public static final ParseField BUCKETS_PATH_FIELD
Field shared by many parsers.
-
type
protected final java.lang.String type
-
metaData
protected java.util.Map<java.lang.String,java.lang.Object> metaData
-
-
Constructor Detail
-
AbstractPipelineAggregationBuilder
protected AbstractPipelineAggregationBuilder(java.lang.String name, java.lang.String type, java.lang.String[] bucketsPaths)
-
AbstractPipelineAggregationBuilder
protected AbstractPipelineAggregationBuilder(StreamInput in, java.lang.String type) throws java.io.IOException
Read from a stream.- Throws:
java.io.IOException
-
-
Method Detail
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:WriteableWrite this into the StreamOutput.- Throws:
java.io.IOException
-
doWriteTo
protected abstract void doWriteTo(StreamOutput out) throws java.io.IOException
- Throws:
java.io.IOException
-
type
public java.lang.String type()
-
validate
public final void validate(AggregatorFactory<?> parent, java.util.Collection<AggregationBuilder> factories, java.util.Collection<PipelineAggregationBuilder> pipelineAggregatorFactories)
Validates the state of this factory (makes sure the factory is properly configured)- Specified by:
validatein classPipelineAggregationBuilder
-
createInternal
protected abstract PipelineAggregator createInternal(java.util.Map<java.lang.String,java.lang.Object> metaData) throws java.io.IOException
- Throws:
java.io.IOException
-
create
public final PipelineAggregator create() throws java.io.IOException
Creates the pipeline aggregator- Specified by:
createin classPipelineAggregationBuilder- Returns:
- The created aggregator
- Throws:
java.io.IOException
-
doValidate
public void doValidate(AggregatorFactory<?> parent, java.util.Collection<AggregationBuilder> factories, java.util.Collection<PipelineAggregationBuilder> pipelineAggregatorFactories)
-
validateSequentiallyOrderedParentAggs
public static void validateSequentiallyOrderedParentAggs(AggregatorFactory<?> parent, java.lang.String type, java.lang.String name)
Validates pipeline aggregations that need sequentially ordered data.
-
setMetaData
public PAB setMetaData(java.util.Map<java.lang.String,java.lang.Object> metaData)
Description copied from class:PipelineAggregationBuilderAssociate metadata with thisPipelineAggregationBuilder.- Specified by:
setMetaDatain interfaceBaseAggregationBuilder- Specified by:
setMetaDatain classPipelineAggregationBuilder
-
toXContent
public final XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Throws:
java.io.IOException
-
overrideBucketsPath
protected boolean overrideBucketsPath()
- Returns:
trueif theAbstractPipelineAggregationBuilderoverrides the XContent rendering of the bucketPath option.
-
internalXContent
protected abstract XContentBuilder internalXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Throws:
java.io.IOException
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
doHashCode
protected abstract int doHashCode()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
doEquals
protected abstract boolean doEquals(java.lang.Object obj)
-
getType
public java.lang.String getType()
Description copied from interface:BaseAggregationBuilderThe name of the type of aggregation built by this builder.
-
-