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


##########
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());
+    }
+
+    /**
+     * Ends the active drain of the Process Group, if there is one. Ending a 
drain does not stop any components.
+     */
+    default void endDrain() {

Review Comment:
   Thanks for the confirmation, sounds good



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