ignite-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [ignite] alex-plekhanov commented on a change in pull request #6845: IGNITE-12145: Monitoring list engine.
Date Wed, 11 Sep 2019 14:33:21 GMT
alex-plekhanov commented on a change in pull request #6845: IGNITE-12145: Monitoring list engine.
URL: https://github.com/apache/ignite/pull/6845#discussion_r323276641
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/processors/metric/GridMetricManager.java
 ##########
 @@ -177,9 +224,60 @@
     /** Registered metrics registries. */
     private final ConcurrentHashMap<String, MetricRegistry> registries = new ConcurrentHashMap<>();
 
+    /** Metrics registry. */
+    private final ReadOnlyMetricRegistry metricsRegistry = new ReadOnlyMetricRegistry() {
+        /** {@inheritDoc} */
+        @NotNull @Override public Iterator<MetricRegistry> iterator() {
+            return registries.values().iterator();
+        }
+
+        /** {@inheritDoc} */
+        @Override public void addMetricRegistryCreationListener(Consumer<MetricRegistry>
lsnr) {
+            metricRegCreationLsnrs.add(lsnr);
+        }
+
+        /** {@inheritDoc} */
+        @Override public void addMetricRegistryRemoveListener(Consumer<MetricRegistry>
lsnr) {
+            metricRegRemoveLsnrs.add(lsnr);
+        }
+    };
+
+    /** Registered lists. */
+    private final ConcurrentHashMap<String, MonitoringList<?>> lists = new ConcurrentHashMap<>();
+
+    /** Lists registry. */
+    private final ReadOnlyMonitoringListRegistry listRegistry = new ReadOnlyMonitoringListRegistry()
{
+        /** {@inheritDoc} */
+        @Override public void addListCreationListener(Consumer<MonitoringList<?>>
lsnr) {
+            listCreationLsnrs.add(lsnr);
+        }
+
+        /** {@inheritDoc} */
+        @Override public void addListRemoveListener(Consumer<MonitoringList<?>>
lsnr) {
+            listRemoveLsnrs.add(lsnr::accept);
 
 Review comment:
   Nested consumer creation, `lsnr::accept` should be replaced with `lsnr`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message