Improve cleanup after device disconnected event
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / statistics / StatisticsManager.java
index 6a3058d70516c3fa1d7d85aa83ed50f7abac9590..0cb22a5160f891ead028016059dadab12465e6ec 100644 (file)
@@ -8,16 +8,29 @@
 
 package org.opendaylight.openflowplugin.api.openflow.statistics;
 
-import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceContextClosedHandler;
-import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceInitializationPhaseHandler;
-import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceInitializator;
+import org.opendaylight.openflowplugin.api.openflow.OFPManager;
+import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
 
 /**
- * Created by Martin Bobak <mbobak@cisco.com> on 26.2.2015.
+ * Manager to start or stop scheduling statistics
  */
-public interface StatisticsManager extends DeviceInitializator, DeviceInitializationPhaseHandler,
-        DeviceContextClosedHandler, AutoCloseable {
+public interface StatisticsManager extends OFPManager {
+
+    /**
+     * Start scheduling statistic gathering for given device info
+     * @param deviceInfo for this device should be running statistics gathering
+     */
+    void startScheduling(final DeviceInfo deviceInfo);
+
+    /**
+     * Stop scheduling statistic gathering for given device info
+     * @param deviceInfo for this device should be stopped statistics gathering
+     */
+    void stopScheduling(final DeviceInfo deviceInfo);
 
     @Override
     void close();
+
+    void setIsStatisticsPollingOn(boolean isStatisticsPollingOn);
+
 }