alex-plekhanov commented on a change in pull request #6845: IGNITE-12145: 
Monitoring list engine.
URL: https://github.com/apache/ignite/pull/6845#discussion_r323636180
 
 

 ##########
 File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/metric/GridMetricManager.java
 ##########
 @@ -265,47 +379,127 @@ public MetricRegistry registry(String name) {
         return registries.computeIfAbsent(name, n -> {
             MetricRegistry mreg = new MetricRegistry(name, log);
 
-            notifyListeners(mreg, metricRegCreationLsnrs);
+            notifyListeners(mreg, metricRegCreationLsnrs, log);
 
             return mreg;
         });
     }
 
-    /** {@inheritDoc} */
-    @NotNull @Override public Iterator<MetricRegistry> iterator() {
-        return registries.values().iterator();
+    /**
+     * Registers list which exports {@link ConcurrentMap} content.
+     *
+     * @param name Name of the list.
+     * @param desc Description of the list.
+     * @param rowCls Row class.
+     * @param data Data of the list.
+     * @param rowFunc value to row function.
+     * @param rowClearer Function that clears data on list removal.
+     * @param <R> List row type.
+     * @param <D> Map data type.
+     */
+    public <R extends MonitoringRow, D> void registerList(String name, String 
desc,
+        Class<R> rowCls, ConcurrentMap<?, D> data, Function<D, R> rowFunc, 
Consumer<D> rowClearer) {
+
+        Supplier<MonitoringList<R>> listCreator = () -> 
(MonitoringList<R>)lists.computeIfAbsent(name, n -> {
 
 Review comment:
   It's not a supplier, you just throw away returned value. Let's use `Runnable`

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to