X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-common-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fcommon%2Fapi%2Fdata%2FAsyncWriteTransaction.java;h=70789ccb1481c36e8179999d341a0bdddecd47b8;hb=0f69f9e83ca8602d7ad7646ff4e146f802c534c1;hp=51bb1db40bdcb078b77b1a970f256f23b28742b2;hpb=9958ef4e1096731404d3c8060ef8376cd105f8ef;p=controller.git diff --git a/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncWriteTransaction.java b/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncWriteTransaction.java index 51bb1db40b..70789ccb14 100644 --- a/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncWriteTransaction.java +++ b/opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncWriteTransaction.java @@ -8,8 +8,14 @@ package org.opendaylight.controller.md.sal.common.api.data; import com.google.common.util.concurrent.CheckedFuture; +import com.google.common.util.concurrent.FluentFuture; import com.google.common.util.concurrent.ListenableFuture; +import com.google.common.util.concurrent.MoreExecutors; +import org.eclipse.jdt.annotation.NonNull; +import org.opendaylight.controller.md.sal.common.api.MappingCheckedFuture; +import org.opendaylight.mdsal.common.api.CommitInfo; import org.opendaylight.yangtools.concepts.Path; +import org.opendaylight.yangtools.util.concurrent.ExceptionMapper; /** * Write transaction provides mutation capabilities for a data tree. @@ -152,8 +158,7 @@ public interface AsyncWriteTransaction
, D> extends AsyncTransa * ({@link AsyncConfigurationCommitHandler}) if the transaction changes the data tree. * *
- * The effects of a successful commit of data depends on data change listeners - * ({@link AsyncDataChangeListener}) and commit participants + * The effects of a successful commit of data depends on data tree change listeners and commit participants * ({@link AsyncConfigurationCommitHandler}) that are registered with the data broker. * *
, D> extends AsyncTransa
*
* @throws IllegalStateException
* if the transaction is not new
+ * @deprecated Use {@link #commit()} instead.
*/
- CheckedFuture
+ * This call logically seals the transaction, which prevents the client from further changing the data tree using
+ * this transaction. Any subsequent calls to
+ * Whether or not the commit is successful is determined by versioning of the data tree and validation of registered
+ * commit participants if the transaction changes the data tree.
+ *
+ *
+ * The effects of a successful commit of data depends on listeners and commit participants that are registered with
+ * the data broker.
+ *
+ *
+ * A successful commit produces implementation-specific {@link CommitInfo} structure, which is used to communicate
+ * post-condition information to the caller. Such information can contain commit-id, timing information or any
+ * other information the implementation wishes to share.
+ *
+ * @return a FluentFuture containing the result of the commit information. The Future blocks until the commit
+ * operation is complete. A successful commit returns nothing. On failure, the Future will fail with a
+ * {@link TransactionCommitFailedException} or an exception derived from TransactionCommitFailedException.
+ * @throws IllegalStateException if the transaction is already committed or was canceled.
+ */
+ @NonNull FluentFuture extends @NonNull CommitInfo> commit();
+
+ /**
+ * This only exists for reuse by the deprecated {@link #submit} method and is not intended for general use.
+ */
+ @Deprecated
+ ExceptionMapperput(LogicalDatastoreType, Path, Object)
,
+ * merge(LogicalDatastoreType, Path, Object)
, delete(LogicalDatastoreType, Path)
will fail
+ * with {@link IllegalStateException}. The transaction is marked as submitted and enqueued into the data store
+ * back-end for processing.
+ *
+ *