public class CountStat extends Object
Keeps track of approximate counts for the last 10 mins, 3 hours, 1 day, and all time.
Constructor and Description |
---|
CountStat(int numBuckets)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
Map<String,Long> |
getTimeCounts()
Get time counts.
|
void |
incBy(long count)
Increase the count by the given value.
|
public CountStat(int numBuckets)
Constructor.
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 Map<String,Long> getTimeCounts()
Get time counts.
public void close()
Copyright © 2022 The Apache Software Foundation. All rights reserved.