exceptionfactory commented on code in PR #115:
URL: https://github.com/apache/nifi-api/pull/115#discussion_r4756523757


##########
src/main/java/org/apache/nifi/components/connector/components/ProcessGroupLifecycle.java:
##########
@@ -51,4 +51,20 @@ public interface ProcessGroupLifecycle {
     CompletableFuture<Void> stopStatelessGroups(ComponentHierarchyScope scope);
 
     int getActiveThreadCount();
+
+    /**
+     * Begins draining the Process Group, so that no new data is brought into 
the group while the data already queued in it is processed.
+     * The drain stays active until {@link #endDrain()} is called.
+     *
+     * @return a future that completes once the drain has begun, or completes 
exceptionally if the drain could not begin
+     */
+    default CompletableFuture<Void> beginDrain() {
+        throw new UnsupportedOperationException("Draining is not supported by 
" + getClass().getName());

Review Comment:
   That makes sense given the available options and implementation plan



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