@Public public interface Counter extends Metric
Metric
that measures a count.Modifier and Type | Method and Description |
---|---|
void |
dec()
Decrement the current count by 1.
|
void |
dec(long n)
Decrement the current count by the given value.
|
long |
getCount()
Returns the current count.
|
default MetricType |
getMetricType() |
void |
inc()
Increment the current count by 1.
|
void |
inc(long n)
Increment the current count by the given value.
|
void inc()
void inc(long n)
n
- value to increment the current count byvoid dec()
void dec(long n)
n
- value to decrement the current count bylong getCount()
default MetricType getMetricType()
getMetricType
in interface Metric
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.