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 aDelegatingCounterwithperWorkerCounterandprocessWideContainerset to false.DelegatingCounter(MetricName name, boolean processWideContainer) Create aDelegatingCounterwithperWorkerCounterset to false.DelegatingCounter(MetricName name, boolean processWideContainer, boolean perWorkerCounter)  - 
Method Summary
 
- 
Constructor Details
- 
DelegatingCounter
Create aDelegatingCounterwithperWorkerCounterandprocessWideContainerset to false.- Parameters:
 name- Metric name for this metric.
 - 
DelegatingCounter
Create aDelegatingCounterwithperWorkerCounterset 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:MetricTheMetricNamegiven to this metric. 
 -