Interface Counter
-
- All Superinterfaces:
AutoCloseable,org.opendaylight.yangtools.concepts.Registration
public interface Counter extends org.opendaylight.yangtools.concepts.RegistrationCounter 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 useMeterwithmark()instead of this.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voiddecrement()voiddecrement(long howMany)longget()Gets the total number of events.default voidincrement()voidincrement(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).
-
-