Enum MetricsUtils

java.lang.Object
java.lang.Enum<MetricsUtils>
com.erudika.para.server.metrics.MetricsUtils
All Implemented Interfaces:
InitializeListener, Serializable, Comparable<MetricsUtils>, Runnable, EventListener

public enum MetricsUtils extends Enum<MetricsUtils> implements InitializeListener, Runnable
A centralized utility for managing and retrieving all Para performance metrics.
Author:
Jeremy Wiesner [[email protected]]
  • Enum Constant Details

    • INSTANCE

      public static final MetricsUtils INSTANCE
      Singleton.
  • Field Details

    • GRAPHITE_REGISTRY_NAME

      public static final String GRAPHITE_REGISTRY_NAME
      The name of the registry holding app-specific settings for reporting metrics to Graphite.
      See Also:
    • GRAPHITE_APP_SETTINGS_NAME

      public static final String GRAPHITE_APP_SETTINGS_NAME
      The name of the app settings object that contains the info to push an app's metrics to Graphite.
      See Also:
  • Method Details

    • values

      public static MetricsUtils[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static MetricsUtils 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
    • getInstance

      public static MetricsUtils getInstance()
      Provides access to the singleton instance methods.
      Returns:
      an instance of this class
    • removeAppSetting

      public static void removeAppSetting(App app, String key)
      A listener method to process removed settings for an application (including the root app).
      Parameters:
      app - the application the setting was removed from.
      key - the name of the setting