MetricsCollectorImpl (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.metrics2.impl, class: MetricsCollectorImpl

Package org.apache.hadoop.metrics2.impl

# Class MetricsCollectorImpl

java.lang.Object
org.apache.hadoop.metrics2.impl.MetricsCollectorImpl

All Implemented Interfaces:
  `Iterable<org.apache.hadoop.metrics2.impl.MetricsRecordBuilderImpl>`, `MetricsCollector`

@Private @VisibleForTesting public class MetricsCollectorImpl extends Object implements MetricsCollector, Iterable<org.apache.hadoop.metrics2.impl.MetricsRecordBuilderImpl>

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MetricsCollectorImpl()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `org.apache.hadoop.metrics2.impl.MetricsRecordBuilderImpl`
  `addRecord(String name)`
  Add a metrics record
  `org.apache.hadoop.metrics2.impl.MetricsRecordBuilderImpl`
  `addRecord(MetricsInfo info)`
  Add a metrics record
  `void`
  `clear()`
  `List<MetricsRecordImpl>`
  `getRecords()`
  `Iterator<org.apache.hadoop.metrics2.impl.MetricsRecordBuilderImpl>`
  `iterator()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface java.lang.Iterable

  `forEach, spliterator`

- ## Constructor Details

  - ### MetricsCollectorImpl

    public MetricsCollectorImpl()

- ## Method Details

  - ### addRecord

    public org.apache.hadoop.metrics2.impl.MetricsRecordBuilderImpl addRecord(MetricsInfo info)
    Description copied from interface: `MetricsCollector`
    Add a metrics record
    Specified by:
      `addRecord` in interface `MetricsCollector`
    Parameters:
      `info` - of the record
    Returns:
      a `MetricsRecordBuilder` for metrics `info`

  - ### addRecord

    public org.apache.hadoop.metrics2.impl.MetricsRecordBuilderImpl addRecord(String name)
    Description copied from interface: `MetricsCollector`
    Add a metrics record
    Specified by:
      `addRecord` in interface `MetricsCollector`
    Parameters:
      `name` - of the record
    Returns:
      a `MetricsRecordBuilder` for the record `name`

  - ### getRecords

    public List<MetricsRecordImpl> getRecords()

  - ### iterator

    public Iterator<org.apache.hadoop.metrics2.impl.MetricsRecordBuilderImpl> iterator()
    Specified by:
      `iterator` in interface `Iterable<org.apache.hadoop.metrics2.impl.MetricsRecordBuilderImpl>`

  - ### clear

    @Private public void clear()