Interface Config

All Known Implementing Classes:
DefaultConfig

public interface Config
Interface representing the configuration settings for metrics collection.
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    Retrieves the version of the configuration file.
    default int
    Retrieves the previous version of the configuration file before loading/updating.
    getProperty(String key, String defaultValue)
    Gets a property value.
    Retrieves the unique identifier of the server.
    boolean
    Checks if debug logging is enabled.
    boolean
    Checks if metrics submission is enabled.
    default boolean
    Checks if this is the first time the metrics are running.
    boolean
    Checks if additional/custom metrics are enabled for submission.
    boolean
    Checks if metrics submission is enabled.
    void
    Sets default properties.
  • Method Details

    • getServerId

      UUID getServerId()
      Retrieves the unique identifier of the server.
      Returns:
      the server identifier UUID
    • isEnabled

      boolean isEnabled()
      Checks if metrics submission is enabled.
      Returns:
      true if enabled, false otherwise
    • isSubmitAdditionalMetrics

      boolean isSubmitAdditionalMetrics()
      Checks if additional/custom metrics are enabled for submission.
      Returns:
      true if enabled, false otherwise
    • isSubmitMetrics

      boolean isSubmitMetrics()
      Checks if metrics submission is enabled.
      Returns:
      true if enabled, false otherwise
    • isDebug

      boolean isDebug()
      Checks if debug logging is enabled.
      Returns:
      true if enabled, false otherwise
    • isFirstRun

      default boolean isFirstRun()
      Checks if this is the first time the metrics are running.
      Returns:
      true if first run, false otherwise
    • setDefaultProperty

      void setDefaultProperty(Map<String,String> properties)
      Sets default properties.
      Parameters:
      properties - the default properties map
    • getProperty

      String getProperty(String key, String defaultValue)
      Gets a property value.
      Parameters:
      key - the key
      defaultValue - the default value to return if not present
      Returns:
      the property value or the default value
    • getConfigVersion

      default int getConfigVersion()
      Retrieves the version of the configuration file.
      Returns:
      the configuration version
    • getOldConfigVersion

      default int getOldConfigVersion()
      Retrieves the previous version of the configuration file before loading/updating. If the configuration file was not upgraded, it will be equal to getConfigVersion().
      Returns:
      the previous configuration version, or getConfigVersion() if not updated