This is an automated email from the ASF dual-hosted git repository. joewitt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push: new 49862d5342 NIFI-12986 Remove depreciation warning from ProcessSession.commit Explain advantage of commitAsync in ProcessSession 49862d5342 is described below commit 49862d5342f5641f49ff1c2493259dd9628d92c2 Author: Lucas <16666115+endzeitbeg...@users.noreply.github.com> AuthorDate: Mon Apr 22 20:14:09 2024 +0300 NIFI-12986 Remove depreciation warning from ProcessSession.commit Explain advantage of commitAsync in ProcessSession This closes #8683 Signed-off-by: Joseph Witt <joew...@apache.org> --- .../src/main/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. * <p> * As soon as the commit completes the session is again ready to be used. + * <p> + * 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