org.apache.hadoop.metrics2
Class MetricGauge<T extends Number>

java.lang.Object
  extended by org.apache.hadoop.metrics2.Metric
      extended by org.apache.hadoop.metrics2.MetricGauge<T>
Type Parameters:
T - value type of the metric

public abstract class MetricGauge<T extends Number>
extends Metric

A generic immutable gauge metric


Field Summary
 
Fields inherited from class org.apache.hadoop.metrics2.Metric
NO_DESCRIPTION
 
Constructor Summary
MetricGauge(String name, String description)
          Construct a gauge metric
 
Method Summary
abstract  T value()
          Get the value of the metric
 
Methods inherited from class org.apache.hadoop.metrics2.Metric
description, equals, hashCode, name, toString, visit
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetricGauge

public MetricGauge(String name,
                   String description)
Construct a gauge metric

Parameters:
name - of the metric
description - of the metric
Method Detail

value

public abstract T value()
Description copied from class: Metric
Get the value of the metric

Specified by:
value in class Metric
Returns:
the value of the metric


Copyright © 2009 The Apache Software Foundation