| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.metrics2.lib.MetricMutable
public abstract class MetricMutable
The mutable metric interface
| Field Summary | |
|---|---|
|  String | descriptiondescription of the metric | 
|  String | namename of the metric | 
| Constructor Summary | |
|---|---|
| MetricMutable(String name,
              String description)Construct a mutable metric | |
| Method Summary | |
|---|---|
|  boolean | changed() | 
| protected  void | clearChanged()Clear the changed flag in the snapshot operations | 
| protected  void | setChanged()Set the changed flag in mutable operations | 
|  void | snapshot(MetricsRecordBuilder builder)Get a sampe/snapshot of metric if changed | 
| abstract  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 | 
| Field Detail | 
|---|
public final String name
public final String description
| Constructor Detail | 
|---|
public MetricMutable(String name,
                     String description)
name - of the metricdescription - of the metric| Method Detail | 
|---|
public abstract void snapshot(MetricsRecordBuilder builder,
                              boolean all)
builder - the metrics record builderall - if true, snapshot unchanged metrics as wellpublic void snapshot(MetricsRecordBuilder builder)
builder - the metrics record builderprotected void setChanged()
protected void clearChanged()
public boolean changed()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||