Package org.apache.iceberg.metrics
Interface MetricsContext.Counter<T extends java.lang.Number>
-
- Enclosing interface:
- MetricsContext
public static interface MetricsContext.Counter<T extends java.lang.Number>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.util.Optional<T>
count()
Reporting count is optional if the counter is reporting externally.void
increment()
Increment the counter by a single whole number value (i.e.void
increment(T amount)
Increment the counter by the provided amount.default MetricsContext.Unit
unit()
-
-
-
Method Detail
-
increment
void increment()
Increment the counter by a single whole number value (i.e. 1).
-
increment
void increment(T amount)
Increment the counter by the provided amount.- Parameters:
amount
- to be incremented
-
count
default java.util.Optional<T> count()
Reporting count is optional if the counter is reporting externally.- Returns:
- current count if available
-
unit
default MetricsContext.Unit unit()
-
-