From 49862d5342f5641f49ff1c2493259dd9628d92c2 Mon Sep 17 00:00:00 2001 From: Lucas <16666115+EndzeitBegins@users.noreply.github.com> Date: Mon, 22 Apr 2024 20:14:09 +0300 Subject: [PATCH] NIFI-12986 Remove depreciation warning from ProcessSession.commit Explain advantage of commitAsync in ProcessSession This closes #8683 Signed-off-by: Joseph Witt --- .../java/org/apache/nifi/processor/ProcessSession.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java b/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java index ecbb9a4019..b3a33dcb3f 100644 --- a/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java +++ b/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java @@ -75,10 +75,11 @@ public interface ProcessSession { * All FlowFiles operated on within this session must be accounted for by transfer or removal or the commit will fail. *

* As soon as the commit completes the session is again ready to be used. + *

+ * See {@link #commitAsync()}, {@link #commitAsync(Runnable)}, and {@link #commitAsync(Runnable, Consumer)}. + * The asynchronous session commit methods are preferable to this commit call for most cases + * as it defers when the actual commit happens to the framework so that it can optimize when the commit call takes place. * - * @deprecated As of NiFi 1.14.0, replaced by {@link #commitAsync()}, {@link #commitAsync(Runnable)}, and {@link #commitAsync(Runnable, Consumer)}. - * The synchronous API is less suited for execution in different runtimes, e.g. MiNiFi or Stateless NiFi, - * and may cause the dataflow in such runtimes to get stuck. * @throws IllegalStateException if detected that this method is being called from within a read or write callback * (see {@link #read(FlowFile, InputStreamCallback)}, {@link #write(FlowFile, StreamCallback)}, * {@link #write(FlowFile, OutputStreamCallback)}) or while a read or write stream is open