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
Modifier and Type | Field and Description |
---|---|
static int |
TEN_MIN_IN_SECONDS |
static String |
TEN_MIN_IN_SECONDS_STR |
Constructor and Description |
---|
MultiCountStat(int numBuckets)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
Map<String,Map<T,Long>> |
getTimeCounts() |
void |
incBy(T key,
long count)
Increase the count by the given value.
|
protected String |
keyToString(T key) |
public static final int TEN_MIN_IN_SECONDS
public static final String TEN_MIN_IN_SECONDS_STR
Copyright © 2022 The Apache Software Foundation. All rights reserved.