Interface Counter
- All Superinterfaces:
AutoCloseable
,org.opendaylight.yangtools.concepts.Registration
public interface Counter
extends org.opendaylight.yangtools.concepts.Registration
Counter metric, which is a simple incrementing and decrementing number.
Note that if you find you only use its increase()
and never decrease()
methods, then you probably want to use Meter
with mark()
instead of this.
-
Method Summary
Methods inherited from interface org.opendaylight.yangtools.concepts.Registration
close
-
Method Details
-
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).
-