Package org.apache.storm.metric.internal
Class MultiCountStat<T>
- java.lang.Object
-
- org.apache.storm.metric.internal.MultiCountStat<T>
-
public class MultiCountStat<T> extends Object
Acts as a MultiCount Stat, but keeps track of approximate counts for the last 10 mins, 3 hours, 1 day, and all time. for the same keys
-
-
Field Summary
Fields Modifier and Type Field Description static intTEN_MIN_IN_SECONDSstatic StringTEN_MIN_IN_SECONDS_STR
-
Constructor Summary
Constructors Constructor Description MultiCountStat(int numBuckets)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Map<String,Map<T,Long>>getTimeCounts()voidincBy(T key, long count)Increase the count by the given value.protected StringkeyToString(T key)
-
-
-
Field Detail
-
TEN_MIN_IN_SECONDS
public static final int TEN_MIN_IN_SECONDS
- See Also:
- Constant Field Values
-
TEN_MIN_IN_SECONDS_STR
public static final String TEN_MIN_IN_SECONDS_STR
- See Also:
- Constant Field Values
-
-