Class DelegatingGauge

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

@Internal public class DelegatingGauge extends Object implements Metric, Gauge, Serializable
Implementation of Gauge that delegates to the instance for the current context.
See Also:
  • Constructor Details

    • DelegatingGauge

      public DelegatingGauge(MetricName name)
      Create a DelegatingGauge with perWorkerGauge and processWideContainer set to false.
      Parameters:
      name - Metric name for this metric.
    • DelegatingGauge

      public DelegatingGauge(MetricName name, boolean processWideContainer)
      Parameters:
      name - Metric name for this metric.
      processWideContainer - Whether this gauge is stored in the ProcessWide container or the current thread's container.
  • Method Details

    • set

      public void set(long n)
      Set the gauge.
      Specified by:
      set in interface Gauge
    • getName

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