Bug 5596 Created lifecycle service
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / statistics / StatisticsContext.java
index 1fa63b803910c0002ac50803b8a77288eb98fbb0..d681cfde8fe36601b14b516127793cc83ef667c4 100644 (file)
@@ -8,11 +8,12 @@
 
 package org.opendaylight.openflowplugin.api.openflow.statistics;
 
-import com.google.common.base.Optional;
 import com.google.common.util.concurrent.ListenableFuture;
 import io.netty.util.Timeout;
+import java.util.Optional;
 import org.opendaylight.openflowplugin.api.openflow.OFPContext;
-import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
+import org.opendaylight.openflowplugin.api.openflow.OFPManager;
+import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo;
 import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
 import org.opendaylight.openflowplugin.api.openflow.rpc.listener.ItemLifecycleListener;
 
@@ -21,8 +22,18 @@ import org.opendaylight.openflowplugin.api.openflow.rpc.listener.ItemLifecycleLi
  */
 public interface StatisticsContext extends RequestContextStack, AutoCloseable, OFPContext {
 
+    /**
+     * Gather data from device
+     * @return true if gathering was successful
+     */
     ListenableFuture<Boolean> gatherDynamicData();
 
+    /**
+     * Initial data gathering
+     * @return true if gathering was successful
+     */
+    ListenableFuture<Boolean> initialGatherDynamicData();
+
     /**
      * Method has to be called from DeviceInitialization Method, otherwise
      * we are not able to poll anything. Statistics Context normally initialize
@@ -48,12 +59,6 @@ public interface StatisticsContext extends RequestContextStack, AutoCloseable, O
      */
     ItemLifecycleListener getItemLifeCycleListener();
 
-    /**
-     * Statistics Context has to be able to return own DeviceCtx
-     * @return {@link DeviceContext}
-     */
-    DeviceContext getDeviceContext();
-
     @Override
     void close();