Class SampledRateCounterConfig

    • 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.
    • 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