import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
/**
- * Handles operations with transactions
+ * Handles operations with transactions.
*/
public interface TxFacade {
/**
* Method creates put operation using provided data in underlying transaction chain.
*/
- <T extends DataObject> void writeToTransaction(final LogicalDatastoreType store, final InstanceIdentifier<T> path,
- final T data) throws Exception;
+ <T extends DataObject> void writeToTransaction(final LogicalDatastoreType store,
+ final InstanceIdentifier<T> path,
+ final T data);
+
+ /**
+ * Method creates put operation using provided data in underlying transaction
+ * chain and flag to create missing parents.
+ * WARNING: This method is slow because of additional reading cost.
+ * Use it only if you really need to create parents.
+ */
+ <T extends DataObject> void writeToTransactionWithParentsSlow(final LogicalDatastoreType store,
+ final InstanceIdentifier<T> path,
+ final T data);
/**
* Method creates delete operation for provided path in underlying transaction chain.
*/
- <T extends DataObject> void addDeleteToTxChain(final LogicalDatastoreType store, final InstanceIdentifier<T> path) throws Exception;
+ <T extends DataObject> void addDeleteToTxChain(final LogicalDatastoreType store,
+ final InstanceIdentifier<T> path);
/**
* Method submits Transaction to DataStore.