public class SampledCounterConfig extends CounterConfig
SampledCounter
Constructor and Description |
---|
SampledCounterConfig(int intervalSecs,
int historySize,
boolean isResetOnSample,
long initialValue)
Make a new timed counter config (duh)
|
Modifier and Type | Method and Description |
---|---|
Counter |
createCounter()
Creates and returns a Counter based on the initial value
|
int |
getHistorySize()
Returns the history size
|
int |
getIntervalSecs()
Returns the interval time (seconds)
|
boolean |
isResetOnSample()
Returns true if counters created from this config will reset on each
sample
|
getInitialValue
public SampledCounterConfig(int intervalSecs, int historySize, boolean isResetOnSample, long initialValue)
intervalSecs
- the interval (in seconds) between samplinghistorySize
- number of counter samples that will be retained in memoryisResetOnSample
- true if the counter should be reset to 0 upon each samplepublic int getHistorySize()
public int getIntervalSecs()
public boolean isResetOnSample()
public Counter createCounter()
createCounter
in class CounterConfig
Copyright 2001-2019, Terracotta, Inc.