X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fapi%2Fopenflow%2Fdevice%2FDeviceContext.java;h=91506239dd13ca926115339f3bf9f3882ed69f78;hb=e1cb3aeda16ea2b08af273dc229248305e2c1c6d;hp=ab68756a6660f7aeb80bfba18c858324dccbad39;hpb=4fe28f187ce26e7b64ba05556c4eda2884e44ce4;p=openflowplugin.git diff --git a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/DeviceContext.java b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/DeviceContext.java index ab68756a66..91506239dd 100644 --- a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/DeviceContext.java +++ b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/device/DeviceContext.java @@ -8,20 +8,23 @@ package org.opendaylight.openflowplugin.api.openflow.device; -import org.opendaylight.controller.md.sal.common.api.data.TransactionChain; +import java.math.BigInteger; +import java.util.Map; +import java.util.concurrent.Future; +import org.opendaylight.controller.md.sal.binding.api.ReadTransaction; +import org.opendaylight.controller.md.sal.binding.api.WriteTransaction; import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext; +import org.opendaylight.openflowplugin.api.openflow.device.exception.DeviceDataException; import org.opendaylight.openflowplugin.api.openflow.device.handlers.MessageHandler; import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader; import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.TableFeatures; - -import java.math.BigInteger; - import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.common.RpcResult; import com.google.common.util.concurrent.SettableFuture; import java.util.Collection; +import java.util.List; import java.util.Map; import java.util.concurrent.Future; @@ -38,8 +41,8 @@ import java.util.concurrent.Future; * which is enforced by keeping a cap on the number of outstanding requests a particular Request * Context can have at any point in time. Should this quota be exceeded, any further attempt to make * a request to the switch will fail immediately, with proper error indication. - *
- * Created by Martin Bobak
+ * Created by Martin Bobak <mbobak@cisco.com> on 25.2.2015.
*/
public interface DeviceContext extends MessageHandler {
@@ -67,18 +70,19 @@ public interface DeviceContext extends MessageHandler {
DeviceState getDeviceState();
/**
- * Method sets transaction chain used for all data store operations on device
- * represented by this context. This transaction chain is write only.
- *
- * @param transactionChain
+ * Method exposes transaction created for device
+ * represented by this context. This should be used as write only.
*/
- void setTransactionChain(TransactionChain transactionChain);
+ WriteTransaction getWriteTransaction();
/**
* Method exposes transaction created for device
- * represented by this context. This should be used as write only.
+ * represented by this context. This should be used as read only.
+ * This read only transaction has a fresh dataStore snapshot and
+ * here is a possibility to get different data set from DataStore
+ * as have a write transaction in this context.
*/
- TransactionChain getTransactionChain();
+ ReadTransaction getReadTransaction();
/**
* Method provides capabilities of connected device.
@@ -103,27 +107,12 @@ public interface DeviceContext extends MessageHandler {
Xid getNextXid();
-