Top Description Fields Constructors Methods
net.sf.ehcache.util.counter.sampled

public Class SampledRateCounterConfig

extends SampledCounterConfig
Class Inheritance
Imports
net.sf.ehcache.util.counter.Counter

An implementation of SampledCounterConfig
Author
Abhishek Sanoujam
Since
1.7

Field Summary

Modifier and TypeField and Description
private final long
private final long

Constructor Summary

AccessConstructor and Description
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.

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.

Method Summary

Modifier and TypeMethod and Description
public Counter
createCounter()

Overrides net.sf.ehcache.util.counter.sampled.SampledCounterConfig.createCounter.

Creates and returns a Counter based on the initial value
Inherited from net.sf.ehcache.util.counter.sampled.SampledCounterConfig:
getHistorySizegetIntervalSecsisResetOnSample

Field Detail

initialDenominatorValueback to summary
private final long initialDenominatorValue
initialNumeratorValueback to summary
private final long initialNumeratorValue

Constructor Detail

SampledRateCounterConfigback to summary
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

SampledRateCounterConfigback to summary
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

Method Detail

createCounterback to summary
public Counter createCounter()

Overrides net.sf.ehcache.util.counter.sampled.SampledCounterConfig.createCounter.

Doc from net.sf.ehcache.util.counter.sampled.SampledCounterConfig.createCounter.

Creates and returns a Counter based on the initial value

Returns:Counter

Doc from net.sf.ehcache.util.counter.CounterConfig.createCounter.

The counter created by this config

Annotations
@Override