ehcache

net.sf.ehcache.util.counter.sampled
Class SampledRateCounterConfig

java.lang.Object
  extended by net.sf.ehcache.util.counter.CounterConfig
      extended by net.sf.ehcache.util.counter.sampled.SampledCounterConfig
          extended by net.sf.ehcache.util.counter.sampled.SampledRateCounterConfig

public class SampledRateCounterConfig
extends SampledCounterConfig

An implementation of SampledCounterConfig

Since:
1.7
Author:
Abhishek Sanoujam

Constructor Summary
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
 Counter createCounter()
          Creates and returns a Counter based on the initial value
 
Methods inherited from class net.sf.ehcache.util.counter.sampled.SampledCounterConfig
getHistorySize, getIntervalSecs, isResetOnSample
 
Methods inherited from class net.sf.ehcache.util.counter.CounterConfig
getInitialValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 class SampledCounterConfig
Returns:
The counter created by this config

ehcache

Copyright 2001-2014, Terracotta, Inc.