Class NoOpCounter

java.lang.Object
org.apache.beam.sdk.metrics.NoOpCounter
All Implemented Interfaces:
Serializable, Counter, Metric

public class NoOpCounter extends Object implements Counter
A no-op implementation of Counter. This class exists to provide a default if an implementation of MetricsContainer does not override a Counter getter.
See Also:
  • Method Details

    • inc

      public void inc()
      Description copied from interface: Counter
      Increment the counter.
      Specified by:
      inc in interface Counter
    • inc

      public void inc(long n)
      Description copied from interface: Counter
      Increment the counter by the given amount.
      Specified by:
      inc in interface Counter
    • dec

      public void dec()
      Specified by:
      dec in interface Counter
    • dec

      public void dec(long n)
      Specified by:
      dec in interface Counter
    • getName

      public MetricName getName()
      Description copied from interface: Metric
      The MetricName given to this metric.
      Specified by:
      getName in interface Metric
    • getInstance

      public static NoOpCounter getInstance()