daradurvs commented on a change in pull request #6845: IGNITE-12145: Monitoring
list engine.
URL: https://github.com/apache/ignite/pull/6845#discussion_r322436697
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/metric/GridMetricManager.java
##########
@@ -265,45 +377,132 @@ 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();
+ /**
+ * <ul>
+ * <li> Creates list is not exists.</li>
+ * <li> Register and call {@code storer} callback on each list
creation.</li>
+ * <li> Register and call {@code cleaner} callback on each list
removal.</li>
+ * </ul>
+ *
+ * List can be created or removed by {@link
IgniteKernal#enableMonitoringList(String)}, {@link
IgniteKernal#disableMonitoringList(String)} calls.
+ *
+ * @param name List name.
+ * @param description List description.
+ * @param row Row class
+ * @param storer Storer callback.
+ * @param cleaner Cleaner callback.
+ * @param <Id> Type of the id of the monitoring row.
+ * @param <R> Type of the monitoring row.
+ */
+ public <Id, R extends MonitoringRow<Id>> void list(String name, String
description,
Review comment:
I believe this method should return MonitoringList.
You always use it to register metrics and initialize fields MonitoringList
in a functional style.
If the method returns `<Id, R extends MonitoringRow<Id>> MonitoringList<Id,
R>` initialize blocks in IgniteServiceProcessor, GridTaskProcessor,
ClusterCachesInfo will be clearer.
----------------------------------------------------------------
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