public class SampledRateCounterImpl extends SampledCounterImpl implements SampledRateCounter
SampledRateCounterhistory, resetOnSample| Constructor and Description |
|---|
SampledRateCounterImpl(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 SampledRateCounterImpl(SampledRateCounterConfig config)
config - public void setValue(long numerator,
long denominator)
setValue in interface SampledRateCounterpublic void increment(long numerator,
long denominator)
increment in interface SampledRateCounterpublic void decrement(long numerator,
long denominator)
decrement in interface SampledRateCounterpublic void setDenominatorValue(long newValue)
setDenominatorValue in interface SampledRateCounterpublic void setNumeratorValue(long newValue)
setNumeratorValue in interface SampledRateCounterpublic long getValue()
getValue in interface CountergetValue in class CounterImplpublic long getAndReset()
getAndReset in interface SampledCountergetAndReset in class SampledCounterImplpublic long getAndSet(long newValue)
getAndSet in interface CountergetAndSet in class CounterImplpublic void setValue(long newValue)
setValue in interface CountersetValue in class CounterImplpublic long decrement()
decrement in interface Counterdecrement in class CounterImplpublic long decrement(long amount)
decrement in interface Counterdecrement in class CounterImplpublic long getMaxValue()
public long getMinValue()
public long increment()
increment in interface Counterincrement in class CounterImplpublic long increment(long amount)
increment in interface Counterincrement in class CounterImplCopyright 2001-2019, Terracotta, Inc.