2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.openflowplugin.api.openflow.registry.flow;
12 import com.google.common.base.Optional;
13 import com.google.common.util.concurrent.ListenableFuture;
14 import java.util.List;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowId;
20 * Registry for mapping composite-key of flow ({@link FlowRegistryKey}) from device view
21 * to flow descriptor ({@link FlowDescriptor}) as the identifier of the same flow in data store.
23 public interface DeviceFlowRegistry extends AutoCloseable {
25 ListenableFuture<List<Optional<FlowCapableNode>>> fill();
27 FlowDescriptor retrieveIdForFlow(FlowRegistryKey flowRegistryKey);
29 void store(FlowRegistryKey flowRegistryKey, FlowDescriptor flowDescriptor);
31 FlowId storeIfNecessary(FlowRegistryKey flowRegistryKey);
33 void removeDescriptor(FlowRegistryKey flowRegistryKey);
35 void update(FlowRegistryKey newFlowRegistryKey,FlowDescriptor flowDescriptor);
37 Map<FlowRegistryKey, FlowDescriptor> getAllFlowDescriptors();