Package org.apache.beam.sdk.metrics
Class DelegatingCounter
java.lang.Object
org.apache.beam.sdk.metrics.DelegatingCounter
- All Implemented Interfaces:
Serializable
,Counter
,Metric
Implementation of
Counter
that delegates to the instance for the current context.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDelegatingCounter
(MetricName name) Create aDelegatingCounter
withperWorkerCounter
andprocessWideContainer
set to false.DelegatingCounter
(MetricName name, boolean processWideContainer) Create aDelegatingCounter
withperWorkerCounter
set to false.DelegatingCounter
(MetricName name, boolean processWideContainer, boolean perWorkerCounter) -
Method Summary
-
Constructor Details
-
DelegatingCounter
Create aDelegatingCounter
withperWorkerCounter
andprocessWideContainer
set to false.- Parameters:
name
- Metric name for this metric.
-
DelegatingCounter
Create aDelegatingCounter
withperWorkerCounter
set to false.- Parameters:
name
- Metric name for this metric.processWideContainer
- Whether this Counter is stored in the ProcessWide container or the current thread's container.
-
DelegatingCounter
- Parameters:
name
- Metric name for this metric.processWideContainer
- Whether this Counter is stored in the ProcessWide container or the current thread's container.perWorkerCounter
- Whether this Counter refers to a perWorker metric or not.
-
-
Method Details
-
inc
public void inc()Increment the counter. -
inc
public void inc(long n) Increment the counter by the given amount. -
dec
public void dec() -
dec
public void dec(long n) -
getName
Description copied from interface:Metric
TheMetricName
given to this metric.
-