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
name
EMPTY_PARAMS
Modifier | Constructor and Description |
---|---|
protected |
InternalStats() |
|
InternalStats(String name,
long count,
double sum,
double min,
double max,
ValueFormatter formatter) |
Modifier and Type | Method and Description |
---|---|
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 |
readFrom(StreamInput in) |
void |
readOtherStatsFrom(StreamInput in) |
InternalStats |
reduce(InternalAggregation.ReduceContext reduceContext)
Reduces the given addAggregation to a single one and returns it.
|
static void |
registerStreams() |
InternalAggregation.Type |
type() |
double |
value(String name) |
protected void |
writeOtherStatsTo(StreamOutput out) |
void |
writeTo(StreamOutput out) |
valueAsString
getName, readSize, toXContent, writeSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
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, @Nullable ValueFormatter formatter)
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 reduce(InternalAggregation.ReduceContext reduceContext)
InternalAggregation
reduce
in class InternalAggregation
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
IOException
public void readOtherStatsFrom(StreamInput in) throws IOException
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
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–2015. All rights reserved.