Package org.apache.flink.metrics
Interface Counter
-
- All Superinterfaces:
Metric
- All Known Implementing Classes:
SimpleCounter
,ThreadSafeSimpleCounter
@Public public interface Counter extends Metric
A Counter is aMetric
that measures a count.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
inc
void inc()
Increment the current count by 1.
-
inc
void inc(long n)
Increment the current count by the given value.- Parameters:
n
- value to increment the current count by
-
dec
void dec()
Decrement the current count by 1.
-
dec
void dec(long n)
Decrement the current count by the given value.- Parameters:
n
- value to decrement the current count by
-
getCount
long getCount()
Returns the current count.- Returns:
- current count
-
getMetricType
default MetricType getMetricType()
- Specified by:
getMetricType
in interfaceMetric
-
-