Terminally-deprecate with-parent put()/merge() operations
[mdsal.git] / binding / mdsal-binding-api / src / main / java / org / opendaylight / mdsal / binding / api / CursorAwareWriteTransaction.java
index 7c024a864b97b8201d2cf47626e8d2c9015f25af..6657f6cc349084056f6543690392518597496f62 100644 (file)
@@ -9,8 +9,7 @@
 package org.opendaylight.mdsal.binding.api;
 
 import com.google.common.util.concurrent.FluentFuture;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
+import edu.umd.cs.findbugs.annotations.CheckReturnValue;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.common.api.TransactionCommitFailedException;
@@ -20,7 +19,6 @@ import org.opendaylight.yangtools.yang.binding.DataObject;
  * Write transaction that provides cursor's with write access to the data tree.
  */
 public interface CursorAwareWriteTransaction extends DataTreeCursorProvider {
-
     /**
      * Create a {@link DataTreeWriteCursor} anchored at the specified path.
      * There can only be one cursor open at a time.
@@ -30,9 +28,8 @@ public interface CursorAwareWriteTransaction extends DataTreeCursorProvider {
      * @return write cursor at the desired location.
      * @throws IllegalStateException when there's an open cursor, or this transaction is closed already.
      */
-    @Nullable
     @Override
-    <T extends DataObject> DataTreeWriteCursor createCursor(@Nonnull DataTreeIdentifier<T> path);
+    <T extends DataObject> DataTreeWriteCursor createCursor(DataTreeIdentifier<T> path);
 
     /**
      * Cancels the transaction.
@@ -48,9 +45,8 @@ public interface CursorAwareWriteTransaction extends DataTreeCursorProvider {
      * Invoking cancel() on finished transaction (future returned by {@link #commit()} already
      * successfully completed) will always fail (return false).
      *
-     * @return <tt>false</tt> if the task could not be cancelled, typically because it has already
-     *         completed normally; <tt>true</tt> otherwise
-     *
+     * @return {@code false} if the task could not be cancelled, typically because it has already
+     *         completed normally; {@code true} otherwise
      */
     boolean cancel();
 
@@ -76,5 +72,6 @@ public interface CursorAwareWriteTransaction extends DataTreeCursorProvider {
      *         operation is complete. A successful commit returns nothing. On failure, the Future will fail with a
      *         {@link TransactionCommitFailedException} or an exception derived from TransactionCommitFailedException.
      */
-    FluentFuture<? extends @NonNull CommitInfo> commit();
+    @CheckReturnValue
+    @NonNull FluentFuture<? extends @NonNull CommitInfo> commit();
 }