Investigate improving monitoring tree for stability (There were many regressions in 3.1).
Potentially refactor AbstractTreeNode:
- Remove if possible "band-aid" fixes:
- Better way to do pattern matching?
- Currently, in getNodes(String pattern) the dotted name pattern is converted to regex. Code goes through the entire list of tree nodes and compares the pattern with the complete dotted name of the nodes to find the list of matching TreeNodes.
- A TreeNode consists of node name and whether the node is enabled. The TreeNode can also contain a method on an instance to invoke to return a Statistic object.
- asadmin get -m (MonitoringReporter) and REST (MonitoringResource) both use the monitoring tree to display the statistics. REST uses getNode (String completeName) and get -m command uses getNodes(String pattern). REST monitoring does not take '*' wildcard like the get -m command can use. That's why they use different path to retrieve the statistics.