org.apache.hadoop.metrics2.util
Class MetricsCache.Record

java.lang.Object
  extended by org.apache.hadoop.metrics2.util.MetricsCache.Record
Enclosing class:
MetricsCache

public static class MetricsCache.Record
extends Object

Cached record


Constructor Summary
MetricsCache.Record()
           
 
Method Summary
 Number getMetric(String key)
          Lookup a metric value
 AbstractMetric getMetricInstance(String key)
          Lookup a metric instance
 String getTag(String key)
          Lookup a tag value
 Set<Map.Entry<String,Number>> metrics()
          Deprecated. use metricsEntrySet() instead
 Set<Map.Entry<String,AbstractMetric>> metricsEntrySet()
           
 Set<Map.Entry<String,String>> tags()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetricsCache.Record

public MetricsCache.Record()
Method Detail

getTag

public String getTag(String key)
Lookup a tag value

Parameters:
key - name of the tag
Returns:
the tag value

getMetric

public Number getMetric(String key)
Lookup a metric value

Parameters:
key - name of the metric
Returns:
the metric value

getMetricInstance

public AbstractMetric getMetricInstance(String key)
Lookup a metric instance

Parameters:
key - name of the metric
Returns:
the metric instance

tags

public Set<Map.Entry<String,String>> tags()
Returns:
the entry set of the tags of the record

metrics

@Deprecated
public Set<Map.Entry<String,Number>> metrics()
Deprecated. use metricsEntrySet() instead

Returns:
entry set of metrics

metricsEntrySet

public Set<Map.Entry<String,AbstractMetric>> metricsEntrySet()
Returns:
entry set of metrics

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014 Apache Software Foundation. All Rights Reserved.