import java.util.Map;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowId;
/**
* Created by Martin Bobak <mbobak@cisco.com> on 8.4.2015.
*/
-public interface DeviceFlowRegistry {
+public interface DeviceFlowRegistry extends AutoCloseable {
- FlowDescriptor retrieveIdForFlow(FlowHash flowHash) throws FlowRegistryException;
+ FlowDescriptor retrieveIdForFlow(FlowRegistryKey flowRegistryKey);
- void store(FlowHash flowHash, FlowDescriptor flowDescriptor);
+ void store(FlowRegistryKey flowRegistryKey, FlowDescriptor flowDescriptor);
- void markToBeremoved(FlowHash flowHash);
+ FlowId storeIfNecessary(FlowRegistryKey flowRegistryKey, short tableId);
+
+ void markToBeremoved(FlowRegistryKey flowRegistryKey);
void removeMarked();
- Map<FlowHash, FlowDescriptor> getAllFlowDescriptors();
+ Map<FlowRegistryKey, FlowDescriptor> getAllFlowDescriptors();
+
+ @Override
+ void close();
}