Package org.apache.iceberg.metrics
Class DefaultCounter
- java.lang.Object
-
- org.apache.iceberg.metrics.DefaultCounter
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidincrement()Increment the counter by 1.voidincrement(long amount)Increment the counter by the provided amount.java.lang.StringtoString()MetricsContext.Unitunit()The unit of the counter.longvalue()Reports the current count.
-
-
-
Field Detail
-
NOOP
public static final Counter NOOP
-
-
Method Detail
-
increment
public void increment()
Description copied from interface:CounterIncrement the counter by 1.
-
increment
public void increment(long amount)
Description copied from interface:CounterIncrement the counter by the provided amount.Implementations may skip the overflow check for better write throughput.
-
value
public long value()
Description copied from interface:CounterReports the current count.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
unit
public MetricsContext.Unit unit()
Description copied from interface:CounterThe unit of the counter.
-
-