Package org.quartz.utils.counter.sampled
Class SampledRateCounterConfig
- java.lang.Object
-
- org.quartz.utils.counter.CounterConfig
-
- org.quartz.utils.counter.sampled.SampledCounterConfig
-
- org.quartz.utils.counter.sampled.SampledRateCounterConfig
-
public class SampledRateCounterConfig extends SampledCounterConfig
An implementation ofSampledCounterConfig
- Since:
- 1.8
- Author:
- Abhishek Sanoujam
-
-
Constructor Summary
Constructors Constructor Description SampledRateCounterConfig(int intervalSecs, int historySize, boolean isResetOnSample)
Constructor accepting the interval time in seconds, history-size and whether counters should reset on each sample or not.SampledRateCounterConfig(int intervalSecs, int historySize, boolean isResetOnSample, long initialNumeratorValue, long initialDenominatorValue)
Constructor accepting the interval time in seconds, history-size and whether counters should reset on each sample or not.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Counter
createCounter()
Creates and returns a Counter based on the initial value-
Methods inherited from class org.quartz.utils.counter.sampled.SampledCounterConfig
getHistorySize, getIntervalSecs, isResetOnSample
-
Methods inherited from class org.quartz.utils.counter.CounterConfig
getInitialValue
-
-
-
-
Constructor Detail
-
SampledRateCounterConfig
public SampledRateCounterConfig(int intervalSecs, int historySize, boolean isResetOnSample)
Constructor accepting the interval time in seconds, history-size and whether counters should reset on each sample or not. Initial values of both numerator and denominator are zeroes- Parameters:
intervalSecs
-historySize
-isResetOnSample
-
-
SampledRateCounterConfig
public SampledRateCounterConfig(int intervalSecs, int historySize, boolean isResetOnSample, long initialNumeratorValue, long initialDenominatorValue)
Constructor accepting the interval time in seconds, history-size and whether counters should reset on each sample or not. Also the initial values for the numerator and the denominator- Parameters:
intervalSecs
-historySize
-isResetOnSample
-initialNumeratorValue
-initialDenominatorValue
-
-
-
Method Detail
-
createCounter
public Counter createCounter()
Creates and returns a Counter based on the initial value- Overrides:
createCounter
in classSampledCounterConfig
- Returns:
- The counter created by this config
-
-