Interface Counter
-
- All Superinterfaces:
AutoCloseable
,UncheckedCloseable
public interface Counter extends UncheckedCloseable
Counter metric, which is a simple incrementing and decrementing number.Note that if you find you only use its
increase()
and neverdecrease()
methods, then you probably want to useMeter
withmark()
instead of this.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
decrement()
void
decrement(long howMany)
long
get()
Gets the total number of events.default void
increment()
void
increment(long howMany)
-
Methods inherited from interface org.opendaylight.infrautils.utils.UncheckedCloseable
close
-
-
-
-
Method Detail
-
increment
default void increment()
-
increment
void increment(long howMany)
-
decrement
default void decrement()
-
decrement
void decrement(long howMany)
-
get
long get()
Gets the total number of events. Beware that this could have overflown. This is typically used in unit tests of metrics, more than to expose the metrics in production (because exposing metrics is really the role of the infrautils metrics implementation of this API).
-
-