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;
* 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.
* @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.
* 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();
* 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();
}