Package org.apache.hadoop.metrics2.lib
Class MutableCounterInt
java.lang.Object
org.apache.hadoop.metrics2.lib.MutableMetric
org.apache.hadoop.metrics2.lib.MutableCounter
org.apache.hadoop.metrics2.lib.MutableCounterInt
A mutable int counter for implementing metrics sources
-
Method Summary
Modifier and TypeMethodDescriptionvoidincr()Increment the metric value by 1.voidincr(int delta) Increment the value by a deltavoidsnapshot(MetricsRecordBuilder builder, boolean all) Get a snapshot of the metricintvalue()Methods inherited from class org.apache.hadoop.metrics2.lib.MutableCounter
infoMethods inherited from class org.apache.hadoop.metrics2.lib.MutableMetric
changed, clearChanged, setChanged, snapshot
-
Method Details
-
incr
public void incr()Description copied from class:MutableCounterIncrement the metric value by 1.- Specified by:
incrin classMutableCounter
-
incr
public void incr(int delta) Increment the value by a delta- Parameters:
delta- of the increment
-
value
public int value() -
snapshot
Description copied from class:MutableMetricGet a snapshot of the metric- Specified by:
snapshotin classMutableMetric- Parameters:
builder- the metrics record builderall- if true, snapshot unchanged metrics as well
-