Merge "Added move of branding jar to assembly"
[controller.git] / opendaylight / md-sal / sal-common-api / src / main / java / org / opendaylight / controller / md / sal / common / api / data / AsyncWriteTransaction.java
index 35b9914a120dc289dbac3ff8c8f7ae85176f5be4..82c48d2ddb27e657c12cb9c8f56f49997923b370 100644 (file)
@@ -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<P extends Path<P>, D>  extends AsyncTransaction<P, D> {
     /**
      * Cancels transaction.
@@ -110,10 +110,12 @@ public interface AsyncWriteTransaction<P extends Path<P>, 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<RpcResult<TransactionStatus>> commit();
+    public ListenableFuture<RpcResult<TransactionStatus>> commit();
 
 }