public interface Counter extends Instrument
Instrument that can only increase in value. It can never return a result that
is less than the last time it was called.
For example a Counter that represents the "number of connections made" will never decrease in value over time, it can only increase in value.
Counters are usually recorded in terms of rate of change over time, eg the rate of change in connections wihin a minute. The fact that a Counter can never go down in value, allows the recorder to better optimize how it stores is values.
Gauge| Modifier and Type | Method and Description |
|---|---|
long |
addAndGet(long delta)
Adds the delta value to the current value and returns the new value.
|
long |
incrementAndGet()
Returns the new value after one has been added to the Counter.
|
getName, getValuecompareTolong incrementAndGet()
long addAndGet(long delta)
delta - the value to addIllegalArgumentException - if the delta value is < 0Copyright © 2016 Atlassian. All rights reserved.