Package org.apache.iceberg.metrics
Interface Counter
-
- All Known Implementing Classes:
DefaultCounter
public interface Counter
Generalized Counter interface for creating telemetry-related instances when counting events.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
increment()
Increment the counter by 1.default void
increment(int amount)
Increment the counter by the provided amount.void
increment(long amount)
Increment the counter by the provided amount.default boolean
isNoop()
Determines whether this counter is a NOOP counter.default MetricsContext.Unit
unit()
The unit of the counter.long
value()
Reports the current count.
-
-
-
Method Detail
-
increment
void increment()
Increment the counter by 1.
-
increment
default void increment(int amount)
Increment the counter by the provided amount.- Parameters:
amount
- to be incremented.
-
increment
void increment(long amount)
Increment the counter by the provided amount.- Parameters:
amount
- to be incremented.
-
value
long value()
Reports the current count.- Returns:
- The current count.
-
unit
default MetricsContext.Unit unit()
The unit of the counter.- Returns:
- The unit of the counter.
-
isNoop
default boolean isNoop()
Determines whether this counter is a NOOP counter.- Returns:
- Whether this counter is a NOOP counter.
-
-