Properly check for FlowRef before touching caches
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / FlowGroupCacheManager.java
index b206aa4a78262c13e7bf37e2f4cc7507a47d380b..51ee56d7e69101c7aaa50a1516537b78e802c471 100644 (file)
@@ -7,12 +7,28 @@
  */
 package org.opendaylight.openflowplugin.api.openflow;
 
+import java.util.Collection;
 import java.util.Map;
-import java.util.Queue;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupTypes;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
+import org.opendaylight.yangtools.yang.common.Uint8;
 
 public interface FlowGroupCacheManager {
 
     Map<String, ReconciliationState> getReconciliationStates();
 
-    Map<String, Queue<FlowGroupCache>> getAllNodesFlowGroupCache();
+    // FIXME: this quite unrelated to getReconciliationStates() to the point
+    Map<NodeId, Collection<FlowGroupInfo>> getAllNodesFlowGroupCache();
+
+    @Nullable Collection<FlowGroupInfo> getFlowGroupCache(@NonNull NodeId nodeId);
+
+    // FIXME: these two methods should live in a separate interface
+    void appendFlow(@NonNull NodeId nodeId, @NonNull FlowId id, Uint8 tableId, @NonNull FlowGroupStatus status);
+
+    void appendGroup(@NonNull NodeId nodeId, @NonNull GroupId id, @NonNull GroupTypes type,
+        @NonNull FlowGroupStatus status);
 }