public class SampledRateCounter extends SampledCounter implements ISampledRateCounter
ISampledRateCounterm_aHistory, m_bResetOnSample| Constructor and Description |
|---|
SampledRateCounter(SampledRateCounterConfig config)
Constructor accepting the config
|
| Modifier and Type | Method and Description |
|---|---|
long |
decrement()
|
long |
decrement(long amount)
|
void |
decrement(long numerator,
long denominator)
Decrements the numerator and denominator by the passed values
|
long |
getAndReset()
Returns the current value of the counter and resets it to 0
|
long |
getAndSet(long newValue)
|
long |
getMaxValue()
|
long |
getMinValue()
|
long |
getValue()
Gets current value of the counter
|
long |
increment()
|
long |
increment(long amount)
|
void |
increment(long numerator,
long denominator)
Increments the numerator and denominator by the passed values
|
void |
setDenominatorValue(long newValue)
Sets the value of the denominator to the passed value
|
void |
setNumeratorValue(long newValue)
Sets the value of the numerator to the passed value
|
void |
setValue(long newValue)
|
void |
setValue(long numerator,
long denominator)
Sets the values of the numerator and denominator to the passed values
|
getAllSampleValues, getIntervalMillis, getMostRecentSample, getTimerTask, shutdownclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAllSampleValues, getMostRecentSample, shutdownpublic SampledRateCounter(@Nonnull SampledRateCounterConfig config)
config - configpublic void setValue(long numerator,
long denominator)
setValue in interface ISampledRateCounterpublic void increment(long numerator,
long denominator)
increment in interface ISampledRateCounterpublic void decrement(long numerator,
long denominator)
decrement in interface ISampledRateCounterpublic void setDenominatorValue(long newValue)
setDenominatorValue in interface ISampledRateCounterpublic void setNumeratorValue(long newValue)
setNumeratorValue in interface ISampledRateCounterpublic long getValue()
public long getAndReset()
getAndReset in interface ISampledCountergetAndReset in class SampledCounterpublic long getAndSet(long newValue)
public void setValue(long newValue)
public long decrement()
public long decrement(long amount)
public long getMaxValue()
public long getMinValue()
public long increment()
Copyright © 2016–2021 Philip Helger. All rights reserved.