public class TimedAdapter extends Object implements TimedStatistics
MetricSupplier when adapting metrics from an external source.
By default this is a non-bucket timed metric.
| Constructor and Description |
|---|
TimedAdapter(String name,
long startTime,
long count,
long total,
long max)
Create with the metric name and values.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getBucketRange()
Return the bucket range for these statistics.
|
long |
getCount()
Return the count of values collected (since the last reset/collection).
|
long |
getMax()
Return the Max value collected (since the last reset/collection).
|
long |
getMean()
Return the mean value rounded up for the values collected since the last reset/collection.
|
String |
getName()
Return the associated metric name.
|
long |
getStartTime()
Return the time these statistics were collected from.
|
long |
getTotal()
Return the total of all the values (since the last reset/collection).
|
boolean |
isBucket()
Return true if this is bucket range based.
|
void |
visit(MetricStatisticsVisitor visitor)
Visit the reporter for the given metric type.
|
public TimedAdapter(String name, long startTime, long count, long total, long max)
public boolean isBucket()
TimedStatisticsisBucket in interface TimedStatisticspublic String getBucketRange()
TimedStatisticsgetBucketRange in interface TimedStatisticspublic long getStartTime()
ValueStatisticsThis should equate to the last time the statistics were collected for reporting purposes so if that is ever minute then this would return the epoch time of 1 minute ago.
getStartTime in interface ValueStatisticspublic long getCount()
ValueStatisticsgetCount in interface ValueStatisticspublic long getTotal()
ValueStatisticsgetTotal in interface ValueStatisticspublic long getMax()
ValueStatisticsgetMax in interface ValueStatisticspublic long getMean()
ValueStatisticsgetMean in interface ValueStatisticspublic String getName()
MetricStatisticsgetName in interface MetricStatisticspublic void visit(MetricStatisticsVisitor visitor)
MetricStatisticsvisit in interface MetricStatisticsCopyright © 2019. All rights reserved.