java.lang.Object
com.atlassian.diagnostics.ipd.api.meters.config.MeterConfig

public class MeterConfig extends Object
Immutable configuration for an IPD meter.

Meters configuration should be configured through the MeterConfigurations.addMeterConfig(String, Consumer) method.

Since:
5.0.0
  • Constructor Details

  • Method Details

    • getEnabledCheck

      public Supplier<Boolean> getEnabledCheck()
      Returns a supplier that checks if the meter is enabled.
      Returns:
      Supplier that checks if the meter is enabled
    • isWorkInProgress

      public boolean isWorkInProgress()
      Returns true if the meter is marked as "work in progress" Work in progress meters require additional feature flag to be enabled.
      Returns:
      true if the meter is marked as "work in progress"
    • getMetricUpdateListener

      public Consumer<IpdMeter> getMetricUpdateListener()
      Returns a listener that is called when the meter value is updated.
      Returns:
      Consumer that is called when the meter value is updated
    • getMeterKey

      public MeterKey getMeterKey()
      Returns the meter key.
      Returns:
      Meter key
    • getObjectName

      public ObjectName getObjectName()
      Returns the object name of the MBean. The object name is used to query the metric value in JMX.
      Returns:
      Object name of the MBean
    • getProperties

      public Map<String,Object> getProperties()
      Returns the unmodifiable properties map of the meter. The properties map is used to store additional configuration of the meter.
      Returns:
      Properties map of the meter
    • isLogOnUpdate

      public boolean isLogOnUpdate()
      Returns true if the meter should log on value update.
      Returns:
      true if the meter should log on value update
    • isIntervalLoggingEnabled

      public boolean isIntervalLoggingEnabled()
      Returns true if the meter should log at regular intervals.
      Returns:
      true if the meter should log at regular intervals
    • getLoggingCondition

      public Predicate<IpdMeter> getLoggingCondition()
      Returns the logging condition of the meter. The logging condition is used to determine if the meter should log at a given time.
      Returns:
      Logging condition of the meter
    • getLogger

      public org.slf4j.Logger getLogger()
      Returns the logger for this meter, logger defines to which file meter value will be logged. The logger is used to log messages from the meter.
      Returns:
      Logger of the meter