org.apache.hadoop.metrics2.lib
Class MetricMutableCounterInt
java.lang.Object
org.apache.hadoop.metrics2.lib.MetricMutable
org.apache.hadoop.metrics2.lib.MetricMutableCounter<Integer>
org.apache.hadoop.metrics2.lib.MetricMutableCounterInt
public class MetricMutableCounterInt
- extends MetricMutableCounter<Integer>
A mutable int counter for implementing metrics sources
Method Summary |
void |
incr()
Increment the metric value by 1. |
void |
incr(int delta)
Increment the value by a delta |
void |
snapshot(MetricsRecordBuilder builder,
boolean all)
Get a snapshot/snapshot of the metric |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MetricMutableCounterInt
public MetricMutableCounterInt(String name,
String description,
int initValue)
- Construct a mutable int counter
- Parameters:
name
- of the counterdescription
- of the counterinitValue
- the initial value of the counter
incr
public void incr()
- Description copied from class:
MetricMutableCounter
- Increment the metric value by 1.
- Specified by:
incr
in class MetricMutableCounter<Integer>
incr
public void incr(int delta)
- Increment the value by a delta
- Parameters:
delta
- of the increment
snapshot
public void snapshot(MetricsRecordBuilder builder,
boolean all)
- Description copied from class:
MetricMutable
- Get a snapshot/snapshot of the metric
- Specified by:
snapshot
in class MetricMutable
- Parameters:
builder
- the metrics record builderall
- if true, snapshot unchanged metrics as well
Copyright © 2009 The Apache Software Foundation