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
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentFragment
,Rewriteable<PipelineAggregationBuilder>
,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 a
PipelineAggregationBuilder
.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.PipelineAggregationBuilder
PipelineAggregationBuilder.ValidationContext
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.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 org.elasticsearch.common.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
-
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 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 org.elasticsearch.common.xcontent.XContentBuilder
internalXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
protected boolean
overrideBucketsPath()
PAB
setMetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)
Associate metadata with thisPipelineAggregationBuilder
.org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
java.lang.String
type()
void
writeTo(StreamOutput out)
Write this into the StreamOutput.Methods inherited from class org.elasticsearch.search.aggregations.PipelineAggregationBuilder
getBucketsPaths, getName, rewrite, subAggregations, toString, validate
-
Field Details
-
BUCKETS_PATH_FIELD
public static final org.elasticsearch.common.ParseField BUCKETS_PATH_FIELDField shared by many parsers. -
type
protected final java.lang.String type -
metadata
protected java.util.Map<java.lang.String,java.lang.Object> metadata
-
-
Constructor Details
-
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.IOExceptionRead from a stream.- Throws:
java.io.IOException
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Throws:
java.io.IOException
-
doWriteTo
- Throws:
java.io.IOException
-
type
public java.lang.String type() -
createInternal
protected abstract PipelineAggregator createInternal(java.util.Map<java.lang.String,java.lang.Object> metadata) -
create
Creates the pipeline aggregator- Specified by:
create
in classPipelineAggregationBuilder
- Returns:
- The created aggregator
-
setMetadata
Description copied from class:PipelineAggregationBuilder
Associate metadata with thisPipelineAggregationBuilder
.- Specified by:
setMetadata
in interfaceBaseAggregationBuilder
- Specified by:
setMetadata
in classPipelineAggregationBuilder
-
toXContent
public final org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.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 org.elasticsearch.common.xcontent.XContentBuilder internalXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Throws:
java.io.IOException
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-
getType
public java.lang.String getType()Description copied from interface:BaseAggregationBuilder
The name of the type of aggregation built by this builder.
-