org.apache.hadoop.fs

## Enum GlobalStorageStatistics

- java.lang.Object
- - java.lang.Enum<GlobalStorageStatistics>
  - - org.apache.hadoop.fs.GlobalStorageStatistics

- All Implemented Interfaces:
    Serializable, Comparable<GlobalStorageStatistics>

      @InterfaceAudience.Public
      public enum GlobalStorageStatistics
      extends Enum<GlobalStorageStatistics>

  Stores global storage statistics objects.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `GlobalStorageStatistics.StorageStatisticsProvider` A callback API for creating new StorageStatistics instances.

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `INSTANCE` The GlobalStorageStatistics singleton.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `StorageStatistics` | `get(String name)` Get the StorageStatistics object with the given name.
    `Iterator<StorageStatistics>` | `iterator()` Get an iterator that we can use to iterate throw all the global storage statistics objects.
    `StorageStatistics` | `put(String name, GlobalStorageStatistics.StorageStatisticsProvider provider)` Create or return the StorageStatistics object with the given name.
    `void` | `reset()` Reset all global storage statistics.
    `static GlobalStorageStatistics` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static GlobalStorageStatistics[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### INSTANCE

          public static final GlobalStorageStatistics INSTANCE

      The GlobalStorageStatistics singleton.

  - ### Method Detail

    - #### values

          public static GlobalStorageStatistics[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (GlobalStorageStatistics c : GlobalStorageStatistics.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static GlobalStorageStatistics valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### get

          public StorageStatistics get(String name)

      Get the StorageStatistics object with the given name.
      Parameters:
        `name` - The storage statistics object name.
      Returns:
        The StorageStatistics object with the given name, or null if there is none.

    - #### put

          public StorageStatistics put(String name,
                                       GlobalStorageStatistics.StorageStatisticsProvider provider)

      Create or return the StorageStatistics object with the given name.
      Parameters:
        `name` - The storage statistics object name.
        `provider` - An object which can create a new StorageStatistics object if needed.
      Returns:
        The StorageStatistics object with the given name.
      Throws:
        `RuntimeException` - If the StorageStatisticsProvider provides a null object or a new StorageStatistics object with the wrong name.

    - #### reset

          public void reset()

      Reset all global storage statistics.

    - #### iterator

          public Iterator<StorageStatistics> iterator()

      Get an iterator that we can use to iterate throw all the global storage statistics objects.

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.