Counter

public interface Counter extends Metric, Counting

Represents a metric that increments and decrements a counted value.

Methods

dec

void dec()

Decrement the counter’s current value by one.

dec

void dec(long n)

Decrement the counter’s current value by the provided value.

Parameters:
  • n – the value to decrement

inc

void inc()

Increment the counter’s current value by one.

inc

void inc(long n)

Increment the counter’s current value by the provided value.

Parameters:
  • n – the value to increment