Interface Config
- All Known Implementing Classes:
DefaultConfig
public interface Config
Interface representing the configuration settings for metrics collection.
-
Method Summary
Modifier and TypeMethodDescriptiondefault intRetrieves the version of the configuration file.default intRetrieves 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.booleanisDebug()Checks if debug logging is enabled.booleanChecks if metrics submission is enabled.default booleanChecks if this is the first time the metrics are running.booleanChecks if additional/custom metrics are enabled for submission.booleanChecks if metrics submission is enabled.voidsetDefaultProperty(Map<String, String> properties) 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
-
getProperty
-
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 togetConfigVersion().- Returns:
- the previous configuration version, or
getConfigVersion()if not updated
-