public class InternalStats extends InternalNumericMetricsAggregation.MultiValue implements Stats
InternalNumericMetricsAggregation.MultiValue, InternalNumericMetricsAggregation.SingleValueInternalAggregation.CommonFields, InternalAggregation.ReduceContext, InternalAggregation.TypeNumericMetricsAggregation.MultiValue, NumericMetricsAggregation.SingleValueToXContent.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 |
valueFormatternameEMPTY_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) |
valueAsStringgetName, readSize, toXContent, writeSizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNamepublic 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 Statspublic String getMinAsString()
getMinAsString in interface Statspublic String getMaxAsString()
getMaxAsString in interface Statspublic String getAvgAsString()
getAvgAsString in interface Statspublic String getSumAsString()
getSumAsString in interface Statspublic InternalAggregation.Type type()
type in class InternalAggregationInternalAggregation.Type of this aggregationpublic double value(String name)
value in class InternalNumericMetricsAggregation.MultiValuepublic InternalStats reduce(InternalAggregation.ReduceContext reduceContext)
InternalAggregationreduce in class InternalAggregationpublic void readFrom(StreamInput in) throws IOException
readFrom in interface StreamableIOExceptionpublic void readOtherStatsFrom(StreamInput in) throws IOException
IOExceptionpublic void writeTo(StreamOutput out) throws IOException
writeTo in interface StreamableIOExceptionprotected void writeOtherStatsTo(StreamOutput out) throws IOException
IOExceptionpublic XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException
doXContentBody in class InternalAggregationIOExceptionprotected XContentBuilder otherStatsToXCotent(XContentBuilder builder, ToXContent.Params params) throws IOException
IOExceptionCopyright © 2009–2016. All rights reserved.