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