## org.apache.hadoop.metrics2
Class MetricCounter<T extends Number>

    java.lang.Object
      org.apache.hadoop.metrics2.Metric
          org.apache.hadoop.metrics2.MetricCounter<T>

Type Parameters:
  `T` - value type of the metric

    public abstract class MetricCounter<T extends Number>

extends Metric

A generic immutable counter metric type

Field Summary

Fields inherited from class org.apache.hadoop.metrics2.Metric
`NO_DESCRIPTION`

Constructor Summary
`MetricCounter(String name, String description)` Construct a counter 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

### MetricCounter

    public MetricCounter(String name,
                         String description)

  Construct a counter 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