NullStateStoreMetrics (Apache Hadoop HDFS-RBF 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.federation.metrics, class: NullStateStoreMetrics

Package org.apache.hadoop.hdfs.server.federation.metrics

# Class NullStateStoreMetrics

java.lang.Object
org.apache.hadoop.hdfs.server.federation.metrics.StateStoreMetrics
org.apache.hadoop.hdfs.server.federation.metrics.NullStateStoreMetrics

All Implemented Interfaces:
  `StateStoreMBean`

public class NullStateStoreMetrics extends StateStoreMetrics
Implementation of the State Store metrics which does not do anything. This is used when the metrics are disabled (e.g., tests).

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NullStateStoreMetrics()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addFailure(long latency)`
  `void`
  `addRead(long latency)`
  `void`
  `addRemove(long latency)`
  `void`
  `addWrite(long latency)`
  `double`
  `getFailureAvg()`
  `long`
  `getFailureOps()`
  `double`
  `getReadAvg()`
  `long`
  `getReadOps()`
  `double`
  `getRemoveAvg()`
  `long`
  `getRemoveOps()`
  `double`
  `getWriteAvg()`
  `long`
  `getWriteOps()`
  `void`
  `reset()`
  `void`
  `setCacheSize(String name, int size)`
  Set the size of the cache for a State Store interface.
  `void`
  `shutdown()`

  ### Methods inherited from class org.apache.hadoop.hdfs.server.federation.metrics.StateStoreMetrics

  `create, getCacheLoadMetrics, setCacheLoading, setLocationCache`

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

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

- ## Constructor Details

  - ### NullStateStoreMetrics

    public NullStateStoreMetrics()

- ## Method Details

  - ### addRead

    public void addRead(long latency)
    Overrides:
      `addRead` in class `StateStoreMetrics`

  - ### getReadOps

    public long getReadOps()
    Specified by:
      `getReadOps` in interface `StateStoreMBean`
    Overrides:
      `getReadOps` in class `StateStoreMetrics`

  - ### getReadAvg

    public double getReadAvg()
    Specified by:
      `getReadAvg` in interface `StateStoreMBean`
    Overrides:
      `getReadAvg` in class `StateStoreMetrics`

  - ### addWrite

    public void addWrite(long latency)
    Overrides:
      `addWrite` in class `StateStoreMetrics`

  - ### getWriteOps

    public long getWriteOps()
    Specified by:
      `getWriteOps` in interface `StateStoreMBean`
    Overrides:
      `getWriteOps` in class `StateStoreMetrics`

  - ### getWriteAvg

    public double getWriteAvg()
    Specified by:
      `getWriteAvg` in interface `StateStoreMBean`
    Overrides:
      `getWriteAvg` in class `StateStoreMetrics`

  - ### addFailure

    public void addFailure(long latency)
    Overrides:
      `addFailure` in class `StateStoreMetrics`

  - ### getFailureOps

    public long getFailureOps()
    Specified by:
      `getFailureOps` in interface `StateStoreMBean`
    Overrides:
      `getFailureOps` in class `StateStoreMetrics`

  - ### getFailureAvg

    public double getFailureAvg()
    Specified by:
      `getFailureAvg` in interface `StateStoreMBean`
    Overrides:
      `getFailureAvg` in class `StateStoreMetrics`

  - ### addRemove

    public void addRemove(long latency)
    Overrides:
      `addRemove` in class `StateStoreMetrics`

  - ### getRemoveOps

    public long getRemoveOps()
    Specified by:
      `getRemoveOps` in interface `StateStoreMBean`
    Overrides:
      `getRemoveOps` in class `StateStoreMetrics`

  - ### getRemoveAvg

    public double getRemoveAvg()
    Specified by:
      `getRemoveAvg` in interface `StateStoreMBean`
    Overrides:
      `getRemoveAvg` in class `StateStoreMetrics`

  - ### setCacheSize

    public void setCacheSize(String name, int size)
    Description copied from class: `StateStoreMetrics`
    Set the size of the cache for a State Store interface.
    Overrides:
      `setCacheSize` in class `StateStoreMetrics`
    Parameters:
      `name` - Name of the record to cache.
      `size` - Number of records.

  - ### reset

    public void reset()
    Overrides:
      `reset` in class `StateStoreMetrics`

  - ### shutdown

    public void shutdown()
    Overrides:
      `shutdown` in class `StateStoreMetrics`