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 ParseField
BUCKETS_PATH_FIELD
Field shared by many parsers.protected java.util.Map<java.lang.String,java.lang.Object>
metaData
protected java.lang.String
type
-
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 protected
AbstractPipelineAggregationBuilder(java.lang.String name, java.lang.String type, java.lang.String[] bucketsPaths)
protected
AbstractPipelineAggregationBuilder(StreamInput in, java.lang.String type)
Read from a stream.
-
Method Summary
Modifier and Type Method Description PipelineAggregator
create()
Creates the pipeline aggregatorprotected abstract PipelineAggregator
createInternal(java.util.Map<java.lang.String,java.lang.Object> metaData)
protected abstract boolean
doEquals(java.lang.Object obj)
protected abstract int
doHashCode()
void
doValidate(AggregatorFactory<?> parent, java.util.Collection<AggregationBuilder> factories, java.util.Collection<PipelineAggregationBuilder> pipelineAggregatorFactories)
protected abstract void
doWriteTo(StreamOutput out)
boolean
equals(java.lang.Object obj)
java.lang.String
getType()
The name of the type of aggregation built by this builder.int
hashCode()
protected abstract XContentBuilder
internalXContent(XContentBuilder builder, ToXContent.Params params)
protected boolean
overrideBucketsPath()
PAB
setMetaData(java.util.Map<java.lang.String,java.lang.Object> metaData)
Associate metadata with thisPipelineAggregationBuilder
.XContentBuilder
toXContent(XContentBuilder builder, ToXContent.Params params)
java.lang.String
type()
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)static void
validateSequentiallyOrderedParentAggs(AggregatorFactory<?> parent, java.lang.String type, java.lang.String name)
Validates pipeline aggregations that need sequentially ordered data.void
writeTo(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:Writeable
Write 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:
validate
in 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:
create
in 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:PipelineAggregationBuilder
Associate metadata with thisPipelineAggregationBuilder
.- Specified by:
setMetaData
in interfaceBaseAggregationBuilder
- Specified by:
setMetaData
in classPipelineAggregationBuilder
-
toXContent
public final XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Throws:
java.io.IOException
-
overrideBucketsPath
protected boolean overrideBucketsPath()
- Returns:
true
if theAbstractPipelineAggregationBuilder
overrides 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:
hashCode
in classjava.lang.Object
-
doHashCode
protected abstract int doHashCode()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
doEquals
protected abstract boolean doEquals(java.lang.Object obj)
-
getType
public java.lang.String getType()
Description copied from interface:BaseAggregationBuilder
The name of the type of aggregation built by this builder.
-
-