NamedWriteable, Writeable, ToXContent, ToXContentFragment, AggregationInternalGeoBounds, InternalGeoCentroid, InternalMultiBucketAggregation, InternalNumericMetricsAggregation, InternalScriptedMetric, InternalSingleBucketAggregation, InternalTopHitspublic abstract class InternalAggregation extends java.lang.Object implements Aggregation, NamedWriteable
Aggregation. Serves as a base class for all aggregation implementations.| Modifier and Type | Class | Description |
|---|---|---|
static class |
InternalAggregation.ReduceContext |
Aggregation.CommonFieldsToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsWriteable.Reader<V>, Writeable.Writer<V>| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
metaData |
|
protected java.lang.String |
name |
TYPED_KEYS_DELIMITEREMPTY_PARAMS| Modifier | Constructor | Description |
|---|---|---|
protected |
InternalAggregation(java.lang.String name,
java.util.List<PipelineAggregator> pipelineAggregators,
java.util.Map<java.lang.String,java.lang.Object> metaData) |
Constructs an get with a given name.
|
protected |
InternalAggregation(StreamInput in) |
Read from a stream.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected abstract boolean |
doEquals(java.lang.Object obj) |
Opportunity for subclasses to add criteria to the
equals(Object)
method for this class. |
protected abstract int |
doHashCode() |
Opportunity for subclasses to the
hashCode() for this
class. |
abstract InternalAggregation |
doReduce(java.util.List<InternalAggregation> aggregations,
InternalAggregation.ReduceContext reduceContext) |
|
protected abstract void |
doWriteTo(StreamOutput out) |
|
abstract XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
|
boolean |
equals(java.lang.Object obj) |
|
java.util.Map<java.lang.String,java.lang.Object> |
getMetaData() |
Get the optional byte array metadata that was set on the aggregation
|
java.lang.String |
getName() |
|
java.lang.Object |
getProperty(java.lang.String path) |
Get the value of specified path in the aggregation.
|
abstract java.lang.Object |
getProperty(java.util.List<java.lang.String> path) |
|
java.lang.String |
getType() |
|
int |
hashCode() |
|
java.util.List<PipelineAggregator> |
pipelineAggregators() |
|
protected static int |
readSize(StreamInput in) |
Read a size under the assumption that a value of 0 means unlimited.
|
InternalAggregation |
reduce(java.util.List<InternalAggregation> aggregations,
InternalAggregation.ReduceContext reduceContext) |
Reduces the given aggregations to a single one and returns it.
|
java.lang.String |
toString() |
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
|
protected static void |
writeSize(int size,
StreamOutput out) |
Write a size under the assumption that a value of 0 means unlimited.
|
void |
writeTo(StreamOutput out) |
Write this into the StreamOutput.
|
getWriteableNameclone, finalize, getClass, notify, notifyAll, wait, wait, waitisFragmentprotected final java.lang.String name
protected final java.util.Map<java.lang.String,java.lang.Object> metaData
protected InternalAggregation(java.lang.String name,
java.util.List<PipelineAggregator> pipelineAggregators,
java.util.Map<java.lang.String,java.lang.Object> metaData)
name - The name of the get.protected InternalAggregation(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic final void writeTo(StreamOutput out) throws java.io.IOException
Writeableprotected abstract void doWriteTo(StreamOutput out) throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getName()
getName in interface Aggregationpublic final InternalAggregation reduce(java.util.List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
public abstract InternalAggregation doReduce(java.util.List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
public java.lang.Object getProperty(java.lang.String path)
path - the path to the property in the aggregation treepublic abstract java.lang.Object getProperty(java.util.List<java.lang.String> path)
protected static int readSize(StreamInput in) throws java.io.IOException
java.io.IOExceptionprotected static void writeSize(int size,
StreamOutput out)
throws java.io.IOException
java.io.IOExceptionpublic java.util.Map<java.lang.String,java.lang.Object> getMetaData()
AggregationgetMetaData in interface Aggregationpublic java.util.List<PipelineAggregator> pipelineAggregators()
public java.lang.String getType()
getType in interface Aggregationpublic final XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent in interface ToXContentjava.io.IOExceptionpublic abstract XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
java.io.IOExceptionpublic int hashCode()
hashCode in class java.lang.Objectprotected abstract int doHashCode()
hashCode() for this
class.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectprotected abstract boolean doEquals(java.lang.Object obj)
equals(Object)
method for this class.
This method can safely cast obj to the subclass since the
equals(Object) method checks that obj is the same
class as thispublic java.lang.String toString()
toString in class java.lang.Object