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, wait
readFrom, writeTo
protected String name
protected InternalAggregation()
protected InternalAggregation(String name)
name
- The name of the get.public String getName()
getName
in interface Aggregation
public abstract InternalAggregation.Type type()
InternalAggregation.Type
of this aggregationpublic abstract InternalAggregation reduce(InternalAggregation.ReduceContext reduceContext)
protected static int readSize(StreamInput in) throws IOException
IOException
protected static void writeSize(int size, StreamOutput out) throws IOException
IOException
public final XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent
in interface ToXContent
IOException
public abstract XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException
IOException
Copyright © 2009–2015. All rights reserved.