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
|
protected double |
sum
|
static InternalAggregation |
TYPE
|
valueFormatternameEMPTY_PARAMS| Modifier | Constructor and Description |
|---|---|
protected |
InternalStats()
|
|
InternalStats(String
|
| Modifier and Type | Method and Description |
|---|---|
XContentBuilder |
doXContentBody(XContentBuilder
|
double |
getAvg()
|
String |
getAvgAsString()
|
long |
getCount()
|
String |
getCountAsString()
|
double |
getMax()
|
String |
getMaxAsString()
|
double |
getMin()
|
String |
getMinAsString()
|
double |
getSum()
|
String |
getSumAsString()
|
protected XContentBuilder |
otherStatsToXCotent(XContentBuilder
|
void |
readFrom(StreamInput
|
void |
readOtherStatsFrom(StreamInput
|
InternalStats |
reduce(InternalAggregation
Reduces the given addAggregation to a single one and returns it.
|
static void |
registerStreams()
|
InternalAggregation |
type()
|
double |
value(String
|
protected void |
writeOtherStatsTo(StreamOutput
|
void |
writeTo(StreamOutput
|
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(Stringname, 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 StringgetCountAsString()
getCountAsString in interface
Stats
public StringgetMinAsString()
getMinAsString in interface
Stats
public StringgetMaxAsString()
getMaxAsString in interface
Stats
public StringgetAvgAsString()
getAvgAsString in interface
Stats
public StringgetSumAsString()
getSumAsString in interface
Stats
public InternalAggregation.Type type()
type in class
InternalAggregation
InternalAggregation.Type of this aggregation
public double value(Stringname)
public InternalStatsreduce(InternalAggregation .ReduceContext reduceContext)
InternalAggregation
public void readFrom(StreamInputin) throws IOException
readFrom in interface
Streamable
IOException
public void readOtherStatsFrom(StreamInputin) throws IOException
IOException
public void writeTo(StreamOutputout) throws IOException
writeTo in interface
Streamable
IOException
protected void writeOtherStatsTo(StreamOutputout) throws IOException
IOException
public XContentBuilderdoXContentBody(XContentBuilder builder, ToXContent .Params params) throws IOException
doXContentBody in class
InternalAggregation
IOException
protected XContentBuilderotherStatsToXCotent(XContentBuilder builder, ToXContent .Params params) throws IOException
IOException