Package org.apache.hadoop.metrics2.lib
Class MutableCounterLong
java.lang.Object
org.apache.hadoop.metrics2.lib.MutableMetric
org.apache.hadoop.metrics2.lib.MutableCounter
org.apache.hadoop.metrics2.lib.MutableCounterLong
A mutable long counter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidincr()Increment the metric value by 1.voidincr(long delta) Increment the value by a deltavoidsnapshot(MetricsRecordBuilder builder, boolean all) Get a snapshot of the metriclongvalue()Methods inherited from class org.apache.hadoop.metrics2.lib.MutableCounter
infoMethods inherited from class org.apache.hadoop.metrics2.lib.MutableMetric
changed, clearChanged, setChanged, snapshot
-
Constructor Details
-
MutableCounterLong
-
-
Method Details
-
incr
public void incr()Description copied from class:MutableCounterIncrement the metric value by 1.- Specified by:
incrin classMutableCounter
-
incr
public void incr(long delta) Increment the value by a delta- Parameters:
delta- of the increment
-
value
public long 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
-