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 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)
-
-
-
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).
-
-