Fix checkstyle warnings
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / device / TxFacade.java
index 6a982b1e6814174984140fe211beef174ff78adc..6c216877dfd511609d53300bc442b5c818417619 100644 (file)
@@ -14,20 +14,32 @@ import org.opendaylight.yangtools.yang.binding.DataObject;
 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.