Package io.debezium.metrics
Class Metrics
java.lang.Object
io.debezium.metrics.Metrics
- Direct Known Subclasses:
PipelineMetrics
,SchemaHistoryMetrics
Base for metrics implementations.
- Author:
- Jiri Pechanec
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
Metrics
(CommonConnectorConfig connectorConfig, String contextName, boolean multiPartitionMode) protected
Metrics
(CdcSourceTaskContext taskContext, String contextName) protected
Metrics
(CdcSourceTaskContext taskContext, Map<String, String> tags) -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectName
metricName
(String connectorType, String connectorName, String contextName, Map<String, String> customTags) protected ObjectName
metricName
(String connectorType, Map<String, String> tags) Create a JMX metric name for the given metric.void
register()
Registers a metrics MBean into the platform MBean server.void
Unregisters a metrics MBean from the platform MBean server.
-
Field Details
-
name
-
registered
private volatile boolean registered
-
-
Constructor Details
-
Metrics
-
Metrics
-
Metrics
protected Metrics(CommonConnectorConfig connectorConfig, String contextName, boolean multiPartitionMode)
-
-
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
-
metricName
Create a JMX metric name for the given metric.- Returns:
- the JMX metric name
-