public abstract class InternalAggregation extends Object implements Aggregation, ToXContent, Streamable
Aggregation. Serves as a base class for all aggregation implementations.| Modifier and Type | Class and Description |
|---|---|
static class |
InternalAggregation.CommonFields
Common xcontent fields that are shared among addAggregation
|
static class |
InternalAggregation.ReduceContext |
static class |
InternalAggregation.Type
The aggregation type that holds all the string types that are associated with an aggregation:
name - used as the parser type
stream - used as the stream type
|
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
protected String |
name |
EMPTY_PARAMS| Modifier | Constructor and Description |
|---|---|
protected |
InternalAggregation()
Constructs an un initialized addAggregation (used for serialization)
|
protected |
InternalAggregation(String name)
Constructs an get with a given name.
|
| Modifier and Type | Method and Description |
|---|---|
abstract XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
String |
getName() |
protected static int |
readSize(StreamInput in)
Read a size under the assumption that a value of 0 means unlimited.
|
abstract InternalAggregation |
reduce(InternalAggregation.ReduceContext reduceContext)
Reduces the given addAggregation to a single one and returns it.
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
abstract InternalAggregation.Type |
type() |
protected static void |
writeSize(int size,
StreamOutput out)
Write a size under the assumption that a value of 0 means unlimited.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadFrom, writeToprotected String name
protected InternalAggregation()
protected InternalAggregation(String name)
name - The name of the get.public String getName()
getName in interface Aggregationpublic abstract InternalAggregation.Type type()
InternalAggregation.Type of this aggregationpublic abstract InternalAggregation reduce(InternalAggregation.ReduceContext reduceContext)
protected static int readSize(StreamInput in) throws IOException
IOExceptionprotected static void writeSize(int size,
StreamOutput out)
throws IOException
IOExceptionpublic final XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent in interface ToXContentIOExceptionpublic abstract XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException
IOExceptionCopyright © 2009–2016. All rights reserved.