Add read-write transaction to the AsyncDataBroker APIs
[mdsal.git] / common / mdsal-common-api / src / main / java / org / opendaylight / mdsal / common / api / AsyncDataTransactionFactory.java
index 8d629b77f42d3728b1a45ef84513e2600e035663..be0df369fdc4ef25c0eac2016cb334a3d457cec4 100644 (file)
@@ -90,4 +90,16 @@ public interface AsyncDataTransactionFactory<P extends Path<P>, D> {
      */
     AsyncWriteTransaction<P, D> newWriteOnlyTransaction();
 
+    /**
+     * Allocates new read-write transaction which provides a mutable view of the data tree.
+     *
+     * <p>
+     * Preconditions for mutation of data tree are captured from the snapshot of data tree state, when the transaction
+     * is allocated. If data was changed during transaction in an incompatible way then the commit of this transaction
+     * will fail. See {@link AsyncWriteTransaction#submit()} for more details about conflicting and not-conflicting
+     * changes and failure scenarios.
+     *
+     * @return new read-write transaction
+     */
+    AsyncReadWriteTransaction<P, D> newReadWriteTransaction();
 }