Package org.apache.heron.api.metric
Class CountStatAndMetric
- java.lang.Object
-
- org.apache.heron.api.metric.CountStatAndMetric
-
-
Constructor Summary
Constructors Constructor Description CountStatAndMetric(int numBuckets)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Map<String,Long>
getTimeCounts()
Get current time countsLong
getValueAndReset()
void
incBy(long count)
Increase the count by the given value.
-
-
-
Method Detail
-
incBy
public void incBy(long count)
Increase the count by the given value.- Parameters:
count
- number to count
-
getValueAndReset
public Long getValueAndReset()
- Specified by:
getValueAndReset
in interfaceIMetric<Long>
-
getTimeCounts
public Map<String,Long> getTimeCounts()
Get current time counts- Returns:
- a map of time window to count. Keys are "600" for last 10 mins "10800" for the last 3 hours "86400" for the last day ":all-time" for all time
-
close
public void close()
-
-