Class Metrics

java.lang.Object
io.debezium.metrics.Metrics
Direct Known Subclasses:
PipelineMetrics, SchemaHistoryMetrics

@ThreadSafe public abstract class Metrics extends Object
Base for metrics implementations.
Author:
Jiri Pechanec
  • Field Details

    • name

      private final ObjectName name
    • registered

      private volatile boolean registered
  • Constructor Details

  • Method Details

    • register

      public void register()
      Registers a metrics MBean into the platform MBean server. The method is intentionally synchronized to prevent preemption between registration and unregistration.
    • unregister

      public void unregister()
      Unregisters a metrics MBean from the platform MBean server. The method is intentionally synchronized to prevent preemption between registration and unregistration.
    • metricName

      protected ObjectName metricName(String connectorType, String connectorName, String contextName)
    • metricName

      protected ObjectName metricName(String connectorType, Map<String,String> tags)
      Create a JMX metric name for the given metric.
      Returns:
      the JMX metric name