Class DefaultMetricsReporterConfig

java.lang.Object
org.eclipse.ditto.internal.utils.health.config.DefaultMetricsReporterConfig
All Implemented Interfaces:
MetricsReporterConfig

@Immutable public final class DefaultMetricsReporterConfig extends Object implements MetricsReporterConfig
This class is the default implementation of the health check persistence metrics-reporter config.
  • Method Details

    • of

      public static DefaultMetricsReporterConfig of(com.typesafe.config.Config config)
      Returns an instance of DefaultMetricsReporterConfig based on the settings of the specified Config.
      Parameters:
      config - is supposed to provide the settings of the persistence config at "metrics-reporter".
      Returns:
      the instance.
      Throws:
      DittoConfigError - if config is invalid.
    • getResolution

      public Duration getResolution()
      Description copied from interface: MetricsReporterConfig
      Returns the resolution how far apart each measurement should be done.
      Specified by:
      getResolution in interface MetricsReporterConfig
      Returns:
      the resolution how far apart each measurement should be done.
    • getHistory

      public int getHistory()
      Description copied from interface: MetricsReporterConfig
      Returns how many historical items to keep.
      Specified by:
      getHistory in interface MetricsReporterConfig
      Returns:
      how many historical items to keep.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object