| Constructor and Description |
|---|
CountStatAndMetric(int numBuckets) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Map<String,Long> |
getTimeCounts() |
Object |
getValueAndReset() |
void |
incBy(long count)
Increase the count by the given value.
|
public CountStatAndMetric(int numBuckets)
numBuckets - the number of buckets to divide the time periods into.public void incBy(long count)
Increase the count by the given value.
count - number to countpublic Object getValueAndReset()
getValueAndReset in interface IMetricIMetricsConsumer#handleDataPoints(org.apache.storm.metric.api.IMetricsConsumer
.TaskInfo,
java.util.Collection). If null is returned nothing will be sent. If this value can be reset, like with a counter, a side effect of calling this should be that the value is reset.public Map<String,Long> getTimeCounts()
public void close()
Copyright © 2019 The Apache Software Foundation. All rights reserved.