BUG-4084: Li:Save flows in operational based on barrier success
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / statistics / StatisticsContext.java
index 6620fe4d055b8a62a2c6e6e5dedec878836e1de1..e7c54940ff82a330e824b819c88f668a2defea27 100644 (file)
@@ -8,18 +8,31 @@
 
 package org.opendaylight.openflowplugin.api.openflow.statistics;
 
+import com.google.common.base.Optional;
 import com.google.common.util.concurrent.ListenableFuture;
-import javax.annotation.CheckForNull;
+import io.netty.util.Timeout;
 import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.MultipartType;
+import org.opendaylight.openflowplugin.api.openflow.rpc.listener.ItemLifecycleListener;
 
 /**
  * Created by Martin Bobak <mbobak@cisco.com> on 27.2.2015.
  */
 public interface StatisticsContext extends RequestContextStack, AutoCloseable {
 
-    public ListenableFuture<Boolean> gatherDynamicData();
+    ListenableFuture<Boolean> gatherDynamicData();
 
-    ListenableFuture<Boolean> gatherDynamicData(@CheckForNull MultipartType multipartType);
+    /**
+     * @param pollTimeout handle to nearest scheduled statistics poll
+     */
+    void setPollTimeout(Timeout pollTimeout);
 
+    /**
+     * @return handle to currently scheduled statistics polling
+     */
+    Optional<Timeout> getPollTimeout();
+
+    /**
+     * @return dedicated item life cycle change listener (per device)
+     */
+    ItemLifecycleListener getItemLifeCycleListener();
 }