markap14 commented on code in PR #89:
URL: https://github.com/apache/nifi-api/pull/89#discussion_r3313257209


##########
src/main/java/org/apache/nifi/reporting/EventAccess.java:
##########
@@ -39,6 +41,22 @@ public interface EventAccess {
      */
     ProcessGroupStatus getGroupStatus(final String groupId);
 
+    /**
+     * Returns one {@link ProcessGroupStatus} per Connector currently 
registered with the runtime, each rooted at the
+     * Connector's managed Process Group. Connector-managed groups are 
siblings of the root Process Group (they have no
+     * parent and are not reachable from {@link #getControllerStatus()}), so 
reporting tasks that wish to surface metrics
+     * for connector-managed flows must consult this method in addition to 
{@link #getControllerStatus()}.
+     *
+     * The default implementation returns an empty collection so that runtimes 
without Connector support — and existing
+     * callers compiled against earlier versions of this interface — continue 
to work unchanged.
+     *
+     * @return one status per Connector's managed Process Group; empty if no 
Connectors are registered or if the runtime
+     *         does not support Connectors
+     */
+    default Collection<ProcessGroupStatus> getConnectorStatuses() {

Review Comment:
   Probably worth introducing a ConnectorStatus here, even if it's currently 
just a wrapper around a ProcessGroupStatus. I suspect this will grow over time.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to