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 aMetricthat measures a count.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voiddec()Decrement the current count by 1.voiddec(long n)Decrement the current count by the given value.longgetCount()Returns the current count.default MetricTypegetMetricType()voidinc()Increment the current count by 1.voidinc(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:
getMetricTypein interfaceMetric
-
-