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=82c48d2ddb27e657c12cb9c8f56f49997923b370;hb=48814d6a264b8f13e5db1422336d9ef25cb05fa9;hp=35b9914a120dc289dbac3ff8c8f7ae85176f5be4;hpb=d5759c52d69ba8725d9bbdc18e81848f319861d1;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 35b9914a12..82c48d2ddb 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 @@ -7,12 +7,12 @@ */ package org.opendaylight.controller.md.sal.common.api.data; -import java.util.concurrent.Future; - import org.opendaylight.controller.md.sal.common.api.TransactionStatus; import org.opendaylight.yangtools.concepts.Path; import org.opendaylight.yangtools.yang.common.RpcResult; +import com.google.common.util.concurrent.ListenableFuture; + public interface AsyncWriteTransaction

, D> extends AsyncTransaction { /** * Cancels transaction. @@ -110,10 +110,12 @@ public interface AsyncWriteTransaction

, D> extends AsyncTrans * @param store Identifier of the store, where commit should occur. * @return Result of the Commit, containing success information or list of * encountered errors, if commit was not successful. The Future - * blocks until {@link TransactionStatus#COMMITED} or - * {@link TransactionStatus#FAILED} is reached. + * blocks until {@link TransactionStatus#COMMITED} is reached. + * Future will fail with {@link TransactionCommitFailedException} + * if Commit of this transaction failed. + * * @throws IllegalStateException if the transaction is not {@link TransactionStatus#NEW} */ - public Future> commit(); + public ListenableFuture> commit(); }