* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.api.openflow.registry.flow;
-
-import java.util.Map;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowId;
+import com.google.common.util.concurrent.ListenableFuture;
+import java.util.List;
+import java.util.Optional;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+import org.opendaylight.openflowplugin.api.openflow.registry.CommonDeviceRegistry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
/**
- * Created by Martin Bobak <mbobak@cisco.com> on 8.4.2015.
+ * Registry for mapping composite-key of flow ({@link FlowRegistryKey}) from device view
+ * to flow descriptor ({@link FlowDescriptor}) as the identifier of the same flow in data store.
*/
-public interface DeviceFlowRegistry extends AutoCloseable {
-
- FlowDescriptor retrieveIdForFlow(FlowRegistryKey flowRegistryKey);
-
- void store(FlowRegistryKey flowRegistryKey, FlowDescriptor flowDescriptor);
-
- FlowId storeIfNecessary(FlowRegistryKey flowRegistryKey, short tableId);
+public interface DeviceFlowRegistry extends CommonDeviceRegistry<FlowRegistryKey> {
- void markToBeremoved(FlowRegistryKey flowRegistryKey);
+ ListenableFuture<List<Optional<FlowCapableNode>>> fill();
- void removeMarked();
+ void storeDescriptor(@Nonnull FlowRegistryKey flowRegistryKey, @Nonnull FlowDescriptor flowDescriptor);
- Map<FlowRegistryKey, FlowDescriptor> getAllFlowDescriptors();
+ @Nullable
+ FlowDescriptor retrieveDescriptor(@Nonnull FlowRegistryKey flowRegistryKey);
- @Override
- void close();
}