alex-plekhanov commented on a change in pull request #6845: IGNITE-12145:
Monitoring list engine.
URL: https://github.com/apache/ignite/pull/6845#discussion_r323593329
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/metric/GridMetricManager.java
##########
@@ -265,45 +378,116 @@ 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();
+ public <R extends MonitoringRow, D> void list(String name, String
description,
+ Class<R> rowClazz, Supplier<ConcurrentMap<?, D>> data, Function<D, R>
rowFunc, Consumer<D> clearer) {
Review comment:
In this case, you will have the same problem with the current implementation
too (the only difference is you can reenable the list to work correctly).
But I think it's better to re-register the list if class who owns the data
recreates the map. In this case, the list will always be up to date and no
reenabling is needed.
----------------------------------------------------------------
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