X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fapi%2Fopenflow%2Fregistry%2Fflow%2FDeviceFlowRegistry.java;h=706c359d6b8836702aba9c2602f51879fafa105a;hb=cfe3a97837951ebbedb337dc988027f10c49f714;hp=ab4da891c03710cddda8f6cdcbde7b1d8e89cf84;hpb=b153612ee6499974635d6064e6d7aa636ee1ccb8;p=openflowplugin.git diff --git a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/registry/flow/DeviceFlowRegistry.java b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/registry/flow/DeviceFlowRegistry.java index ab4da891c0..706c359d6b 100644 --- a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/registry/flow/DeviceFlowRegistry.java +++ b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/registry/flow/DeviceFlowRegistry.java @@ -5,30 +5,27 @@ * 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 { - void markToBeremoved(FlowRegistryKey flowRegistryKey); + ListenableFuture>> fill(); - void removeMarked(); + void storeDescriptor(@Nonnull FlowRegistryKey flowRegistryKey, @Nonnull FlowDescriptor flowDescriptor); - Map getAllFlowDescriptors(); + @Nullable + FlowDescriptor retrieveDescriptor(@Nonnull FlowRegistryKey flowRegistryKey); - @Override - void close(); }