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 SummaryModifier and TypeMethodDescriptionvoidIncrement the counter by 1.default voidincrement(int amount) Increment the counter by the provided amount.voidincrement(long amount) Increment the counter by the provided amount.default booleanisNoop()Determines whether this counter is a NOOP counter.default MetricsContext.Unitunit()The unit of the counter.longvalue()Reports the current count.
- 
Method Details- 
incrementvoid increment()Increment the counter by 1.
- 
incrementdefault void increment(int amount) Increment the counter by the provided amount.Implementations may skip the overflow check for better write throughput. - Parameters:
- amount- to be incremented.
 
- 
incrementvoid increment(long amount) Increment the counter by the provided amount.Implementations may skip the overflow check for better write throughput. - Parameters:
- amount- to be incremented.
 
- 
valuelong value()Reports the current count.- Returns:
- The current count.
 
- 
unitThe unit of the counter.- Returns:
- The unit of the counter.
 
- 
isNoopdefault boolean isNoop()Determines whether this counter is a NOOP counter.- Returns:
- Whether this counter is a NOOP counter.
 
 
-