| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.metrics.spi.MetricsRecordImpl
public class MetricsRecordImpl
An implementation of MetricsRecord.  Keeps a back-pointer to the context
 from which it was created, and delegates back to it on update
 and remove().
| Constructor Summary | |
|---|---|
protected  | 
MetricsRecordImpl(String recordName,
                  AbstractMetricsContext context)
Creates a new instance of FileRecord  | 
| Method Summary | |
|---|---|
 String | 
getRecordName()
Returns the record name.  | 
 void | 
incrMetric(String metricName,
           byte metricValue)
Increments the named metric by the specified value.  | 
 void | 
incrMetric(String metricName,
           float metricValue)
Increments the named metric by the specified value.  | 
 void | 
incrMetric(String metricName,
           int metricValue)
Increments the named metric by the specified value.  | 
 void | 
incrMetric(String metricName,
           long metricValue)
Increments the named metric by the specified value.  | 
 void | 
incrMetric(String metricName,
           short metricValue)
Increments the named metric by the specified value.  | 
 void | 
remove()
Removes the row, if it exists, in the buffered data table having tags that equal the tags that have been set on this record.  | 
 void | 
removeTag(String tagName)
Removes any tag of the specified name.  | 
 void | 
setMetric(String metricName,
          byte metricValue)
Sets the named metric to the specified value.  | 
 void | 
setMetric(String metricName,
          float metricValue)
Sets the named metric to the specified value.  | 
 void | 
setMetric(String metricName,
          int metricValue)
Sets the named metric to the specified value.  | 
 void | 
setMetric(String metricName,
          long metricValue)
Sets the named metric to the specified value.  | 
 void | 
setMetric(String metricName,
          short metricValue)
Sets the named metric to the specified value.  | 
 void | 
setTag(String tagName,
       byte tagValue)
Sets the named tag to the specified value.  | 
 void | 
setTag(String tagName,
       int tagValue)
Sets the named tag to the specified value.  | 
 void | 
setTag(String tagName,
       long tagValue)
Sets the named tag to the specified value.  | 
 void | 
setTag(String tagName,
       short tagValue)
Sets the named tag to the specified value.  | 
 void | 
setTag(String tagName,
       String tagValue)
Sets the named tag to the specified value.  | 
 void | 
update()
Updates the table of buffered data which is to be sent periodically.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
protected MetricsRecordImpl(String recordName,
                            AbstractMetricsContext context)
| Method Detail | 
|---|
public String getRecordName()
getRecordName in interface MetricsRecord
public void setTag(String tagName,
                   String tagValue)
setTag in interface MetricsRecordtagName - name of the tagtagValue - new value of the tag
MetricsException - if the tagName conflicts with the configuration
public void setTag(String tagName,
                   int tagValue)
setTag in interface MetricsRecordtagName - name of the tagtagValue - new value of the tag
MetricsException - if the tagName conflicts with the configuration
public void setTag(String tagName,
                   long tagValue)
setTag in interface MetricsRecordtagName - name of the tagtagValue - new value of the tag
MetricsException - if the tagName conflicts with the configuration
public void setTag(String tagName,
                   short tagValue)
setTag in interface MetricsRecordtagName - name of the tagtagValue - new value of the tag
MetricsException - if the tagName conflicts with the configuration
public void setTag(String tagName,
                   byte tagValue)
setTag in interface MetricsRecordtagName - name of the tagtagValue - new value of the tag
MetricsException - if the tagName conflicts with the configurationpublic void removeTag(String tagName)
removeTag in interface MetricsRecordtagName - name of a tag
public void setMetric(String metricName,
                      int metricValue)
setMetric in interface MetricsRecordmetricName - name of the metricmetricValue - new value of the metric
MetricsException - if the metricName or the type of the metricValue 
 conflicts with the configuration
public void setMetric(String metricName,
                      long metricValue)
setMetric in interface MetricsRecordmetricName - name of the metricmetricValue - new value of the metric
MetricsException - if the metricName or the type of the metricValue 
 conflicts with the configuration
public void setMetric(String metricName,
                      short metricValue)
setMetric in interface MetricsRecordmetricName - name of the metricmetricValue - new value of the metric
MetricsException - if the metricName or the type of the metricValue 
 conflicts with the configuration
public void setMetric(String metricName,
                      byte metricValue)
setMetric in interface MetricsRecordmetricName - name of the metricmetricValue - new value of the metric
MetricsException - if the metricName or the type of the metricValue 
 conflicts with the configuration
public void setMetric(String metricName,
                      float metricValue)
setMetric in interface MetricsRecordmetricName - name of the metricmetricValue - new value of the metric
MetricsException - if the metricName or the type of the metricValue 
 conflicts with the configuration
public void incrMetric(String metricName,
                       int metricValue)
incrMetric in interface MetricsRecordmetricName - name of the metricmetricValue - incremental value
MetricsException - if the metricName or the type of the metricValue 
 conflicts with the configuration
public void incrMetric(String metricName,
                       long metricValue)
incrMetric in interface MetricsRecordmetricName - name of the metricmetricValue - incremental value
MetricsException - if the metricName or the type of the metricValue 
 conflicts with the configuration
public void incrMetric(String metricName,
                       short metricValue)
incrMetric in interface MetricsRecordmetricName - name of the metricmetricValue - incremental value
MetricsException - if the metricName or the type of the metricValue 
 conflicts with the configuration
public void incrMetric(String metricName,
                       byte metricValue)
incrMetric in interface MetricsRecordmetricName - name of the metricmetricValue - incremental value
MetricsException - if the metricName or the type of the metricValue 
 conflicts with the configuration
public void incrMetric(String metricName,
                       float metricValue)
incrMetric in interface MetricsRecordmetricName - name of the metricmetricValue - incremental value
MetricsException - if the metricName or the type of the metricValue 
 conflicts with the configurationpublic void update()
update in interface MetricsRecordpublic void remove()
remove in interface MetricsRecord
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||