nizhikov commented on code in PR #11293:
URL: https://github.com/apache/ignite/pull/11293#discussion_r1545865576
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/metric/MetricRegistryImpl.java:
##########
@@ -40,23 +41,21 @@
import org.apache.ignite.internal.processors.metric.impl.LongGauge;
import org.apache.ignite.internal.processors.metric.impl.ObjectGauge;
import org.apache.ignite.internal.processors.metric.impl.ObjectMetricImpl;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.spi.metric.BooleanMetric;
-import org.apache.ignite.spi.metric.IntMetric;
+import org.apache.ignite.metric.MetricRegistry;
import org.apache.ignite.spi.metric.Metric;
-import org.apache.ignite.spi.metric.ReadOnlyMetricRegistry;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import static
org.apache.ignite.internal.processors.metric.impl.HitRateMetric.DFLT_SIZE;
import static
org.apache.ignite.internal.processors.metric.impl.MetricUtils.fromFullName;
+import static
org.apache.ignite.internal.processors.metric.impl.MetricUtils.isCustomPref;
import static
org.apache.ignite.internal.processors.metric.impl.MetricUtils.metricName;
import static
org.apache.ignite.internal.util.lang.GridFunc.nonThrowableSupplier;
/**
* Metric registry.
*/
-public class MetricRegistry implements ReadOnlyMetricRegistry {
+public class MetricRegistryImpl implements MetricRegistry {
Review Comment:
Looks like `MetricRegistry` only used when custom metrics returned to the
user.
Looke like we can keep `MetricRegistryImpl implements
ReadOnlyMetricRegistry` to reduce changes in internal code and return some kind
of adapter to the user:
```
MetricRegistryImpl reg = ...;
return new MetricRegistry {
public void register(...) {
reg.register(...);
}
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]