public class InternalStats extends InternalNumericMetricsAggregation.MultiValue implements Stats
InternalNumericMetricsAggregation.MultiValue, InternalNumericMetricsAggregation.SingleValue
InternalAggregation.CommonFields, InternalAggregation.ReduceContext, InternalAggregation.Type
NumericMetricsAggregation.MultiValue, NumericMetricsAggregation.SingleValue
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
protected long |
count |
protected double |
max |
protected double |
min |
static AggregationStreams.Stream |
STREAM |
protected double |
sum |
static InternalAggregation.Type |
TYPE |
valueFormatter
metaData, name
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
InternalStats() |
|
InternalStats(String name,
long count,
double sum,
double min,
double max,
ValueFormatter formatter,
List<PipelineAggregator> pipelineAggregators,
Map<String,Object> metaData) |
Modifier and Type | Method and Description |
---|---|
protected void |
doReadFrom(StreamInput in) |
InternalStats |
doReduce(List<InternalAggregation> aggregations,
InternalAggregation.ReduceContext reduceContext) |
protected void |
doWriteTo(StreamOutput out) |
XContentBuilder |
doXContentBody(XContentBuilder builder,
ToXContent.Params params) |
double |
getAvg() |
String |
getAvgAsString() |
long |
getCount() |
String |
getCountAsString() |
double |
getMax() |
String |
getMaxAsString() |
double |
getMin() |
String |
getMinAsString() |
double |
getSum() |
String |
getSumAsString() |
protected XContentBuilder |
otherStatsToXCotent(XContentBuilder builder,
ToXContent.Params params) |
void |
readOtherStatsFrom(StreamInput in) |
static void |
registerStreams() |
InternalAggregation.Type |
type() |
double |
value(String name) |
protected void |
writeOtherStatsTo(StreamOutput out) |
getProperty, valueAsString
getMetaData, getName, getProperty, pipelineAggregators, readFrom, readSize, reduce, toXContent, writeSize, writeTo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMetaData, getName, getProperty
public static final InternalAggregation.Type TYPE
public static final AggregationStreams.Stream STREAM
protected long count
protected double min
protected double max
protected double sum
protected InternalStats()
public InternalStats(String name, long count, double sum, double min, double max, ValueFormatter formatter, List<PipelineAggregator> pipelineAggregators, Map<String,Object> metaData)
public static void registerStreams()
public long getCount()
public double getMin()
public double getMax()
public double getAvg()
public double getSum()
public String getCountAsString()
getCountAsString
in interface Stats
public String getMinAsString()
getMinAsString
in interface Stats
public String getMaxAsString()
getMaxAsString
in interface Stats
public String getAvgAsString()
getAvgAsString
in interface Stats
public String getSumAsString()
getSumAsString
in interface Stats
public InternalAggregation.Type type()
type
in class InternalAggregation
InternalAggregation.Type
of this aggregationpublic double value(String name)
value
in class InternalNumericMetricsAggregation.MultiValue
public InternalStats doReduce(List<InternalAggregation> aggregations, InternalAggregation.ReduceContext reduceContext)
doReduce
in class InternalAggregation
protected void doReadFrom(StreamInput in) throws IOException
doReadFrom
in class InternalAggregation
IOException
public void readOtherStatsFrom(StreamInput in) throws IOException
IOException
protected void doWriteTo(StreamOutput out) throws IOException
doWriteTo
in class InternalAggregation
IOException
protected void writeOtherStatsTo(StreamOutput out) throws IOException
IOException
public XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException
doXContentBody
in class InternalAggregation
IOException
protected XContentBuilder otherStatsToXCotent(XContentBuilder builder, ToXContent.Params params) throws IOException
IOException
Copyright © 2009–2017. All rights reserved.