Merge "Bug 6110: Fixed bugs in statistics manager due to race condition." into stable...
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / device / DeviceManager.java
index 3af5e496428bf83d98bb3f948ae68d1eb52dad49..d55908b211b78f750c94a31e1d91179cde40a882 100644 (file)
@@ -8,46 +8,42 @@
 
 package org.opendaylight.openflowplugin.api.openflow.device;
 
-import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
-import org.opendaylight.controller.md.sal.binding.api.NotificationService;
+import com.google.common.util.concurrent.CheckedFuture;
+import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipListener;
+import org.opendaylight.controller.md.sal.common.api.clustering.EntityOwnershipService;
+import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
+import org.opendaylight.openflowplugin.api.openflow.OFPManager;
 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceConnectedHandler;
 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceDisconnectedHandler;
-import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceInitializationPhaseHandler;
-import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceLifecycleSupervisor;
-import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceTerminationPhaseHandler;
 import org.opendaylight.openflowplugin.api.openflow.translator.TranslatorLibrarian;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 
 /**
  * This interface is responsible for instantiating DeviceContext and
  * registering transaction chain for each DeviceContext. Each device
  * has its own device context managed by this manager.
- * Created by Martin Bobak <mbobak@cisco.com> on 25.2.2015.
  */
-public interface DeviceManager extends DeviceConnectedHandler, DeviceDisconnectedHandler, DeviceLifecycleSupervisor,
-        DeviceInitializationPhaseHandler, DeviceTerminationPhaseHandler, TranslatorLibrarian, AutoCloseable {
-
-    /**
-     * Sets notification publish service
-     *
-     * @param notificationPublishService
-     */
-    void setNotificationPublishService(NotificationPublishService notificationPublishService);
+public interface DeviceManager extends
+        OFPManager,
+        DeviceConnectedHandler,
+        DeviceDisconnectedHandler,
+        TranslatorLibrarian,
+        EntityOwnershipListener {
 
     /**
      * invoked after all services injected
      */
     void initialize();
 
-    /**
-     * Returning device context from map maintained in device manager
-     * This prevent to send whole device context to another context
-     * If device context not exists for nodeId it will return null
-     * @param nodeId
-     * @return device context or null
-     */
-    DeviceContext getDeviceContextFromNodeId(NodeId nodeId);
+    void setFlowRemovedNotificationOn(boolean value);
+
+    boolean isFlowRemovedNotificationOn();
+
+    void setSkipTableFeatures(boolean skipTableFeatures);
+
+    void setBarrierCountLimit(int barrierCountLimit);
+
+    void setBarrierInterval(long barrierTimeoutLimit);
 
-    void setStatisticsRpcEnabled(boolean isStatisticsRpcEnabled);
+    CheckedFuture<Void, TransactionCommitFailedException> removeDeviceFromOperationalDS(DeviceInfo deviceInfo);
 }