public interface CounterMXBean extends SimonSuperMXBean
Counter
.
It is not created by default when JMX is activated - it must be created explicitly.
JmxRegisterCallback
can be used to automate this.Modifier and Type | Method and Description |
---|---|
void |
decrease()
Decrements the counter by one.
|
void |
decrease(long dec)
Increments the counter by the specified value.
|
long |
getCounter()
Returns the current value of the counter.
|
long |
getDecrementSum()
Returns the sum of all decremented values (as a positive number).
|
long |
getIncrementSum()
Returns the sum of all incremented values.
|
long |
getMax()
Returns maximal value of counter.
|
long |
getMaxTimestamp()
Returns ms timestamp when the max value was reached.
|
long |
getMin()
Returns minimal value of counter.
|
long |
getMinTimestamp()
Returns ms timestamp when the min value was reached.
|
void |
increase()
Increments the counter by one.
|
void |
increase(long inc)
Increments the counter by the specified value.
|
CounterSample |
sample()
Samples Simon values and returns them in a Java Bean derived from Sample interface.
|
CounterSample |
sampleIncrement(String key)
Samples increment in Simon values since the previous call of this method with the
same key.
|
void |
set(long val)
Sets the value of the counter to specified value.
|
getChildrenNames, getFirstUsage, getFirstUsageAsString, getLastUsage, getLastUsageAsString, getName, getNote, getParentName, getState, getType, isEnabled, setNote, setState, stopIncrementalSampling
void increase()
Counter.increase()
void decrease()
Counter.decrease()
void increase(long inc)
inc
- added valueCounter.increase(long)
void decrease(long dec)
dec
- subtracted valueCounter.decrease(long)
long getCounter()
Counter.getCounter()
long getMin()
Counter.getMin()
long getMinTimestamp()
Counter.getMinTimestamp()
long getMax()
Counter.getMax()
long getMaxTimestamp()
Counter.getMaxTimestamp()
void set(long val)
val
- new counter valueCounter.set(long)
long getIncrementSum()
Counter.getIncrementSum()
long getDecrementSum()
Counter.getDecrementSum()
CounterSample sample()
SimonSuperMXBean
sample
in interface SimonSuperMXBean
CounterSample sampleIncrement(String key)
SimonSuperMXBean
SimonSuperMXBean.sample()
. Any subsequent calls with the key
provide increments.
Clients should use a unique key (GUID, host name, etc.), to avoid interference
with other clients.sampleIncrement
in interface SimonSuperMXBean
key
- key used to access incremental sampleSample
with value incrementsCopyright © 2019. All rights reserved.