Switch to MD-SAL APIs
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / device / TxFacade.java
index 02661467c2437fe27426e84b86f874dee4d29911..79e033abbcd00ecc66ad8f5e378c35edadd4131e 100644 (file)
@@ -5,11 +5,10 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.api.openflow.device;
 
-import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.mdsal.binding.api.ReadTransaction;
+import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
@@ -44,6 +43,12 @@ public interface TxFacade {
      */
     boolean submitTransaction();
 
+    /**
+     * Method submits Transaction to DataStore and wait till completes by doing get on tx future.
+     * @return transaction is submitted successfully
+     */
+    boolean syncSubmitTransaction();
+
     /**
      * Method exposes transaction created for device
      * represented by this context. This read only transaction has a fresh dataStore snapshot.
@@ -51,7 +56,7 @@ public interface TxFacade {
      * as write transaction in this context.
      * @return readOnlyTransaction - Don't forget to close it after finish reading
      */
-    ReadOnlyTransaction getReadTransaction();
+    ReadTransaction getReadTransaction();
 
     /**
      * Method returns true if transaction chain manager is enabled.