Class MeterConfig
java.lang.Object
com.atlassian.diagnostics.ipd.api.meters.config.MeterConfig
Immutable configuration for an IPD meter.
Meters configuration should be configured through the
MeterConfigurations.addMeterConfig(String, Consumer) method.
- Since:
- 5.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCommon property keys used in the properties map of the meter. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a supplier that checks if the meter is enabled.org.slf4j.LoggerReturns the logger for this meter, logger defines to which file meter value will be logged.Returns the logging condition of the meter.Returns the meter key.Returns a listener that is called when the meter value is updated.Returns the object name of the MBean.Returns the unmodifiable properties map of the meter.booleanReturns true if the meter should log at regular intervals.booleanReturns true if the meter should log on value update.booleanReturns true if the meter is marked as "work in progress" Work in progress meters require additional feature flag to be enabled.
-
Constructor Details
-
MeterConfig
-
-
Method Details
-
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
Returns a listener that is called when the meter value is updated.- Returns:
- Consumer that is called when the meter value is updated
-
getMeterKey
Returns the meter key.- Returns:
- Meter key
-
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
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
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
-