blob: e690c39c5d767b7f6000947f88730f0870ff224a [file] [log] [blame]
Hyunsun Moonf4ba44f2017-03-14 03:25:52 +09001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2017-present Open Networking Foundation
Hyunsun Moonf4ba44f2017-03-14 03:25:52 +09003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.ofagent.api;
17
18import org.onosproject.incubator.net.virtual.NetworkId;
19import org.onosproject.store.Store;
20
21import java.util.Set;
22
23/**
24 * Manages inventory of OpenFlow agent states; not intended for direct use.
25 */
26public interface OFAgentStore extends Store<OFAgentEvent, OFAgentStoreDelegate> {
27
28 /**
29 * Creates the new openflow agent.
30 *
31 * @param ofAgent the new ofagent
32 */
33 void createOfAgent(OFAgent ofAgent);
34
35 /**
36 * Updates the openflow agent.
37 *
38 * @param ofAgent the updated ofagent
39 */
40 void updateOfAgent(OFAgent ofAgent);
41
42 /**
43 * Removes the openflow agent for the supplied network ID.
44 *
45 * @param networkId virtual network identifier
46 * @return removed agent; null if remove failed
47 */
48 OFAgent removeOfAgent(NetworkId networkId);
49
50 /**
51 * Returns the openflow agent with the supplied network ID.
52 *
53 * @param networkId virtual network identifier
54 * @return ofagent; null if no ofagent exists for the network
55 */
56 OFAgent ofAgent(NetworkId networkId);
57
58 /**
59 * Returns all openflow agents.
60 *
61 * @return set of ofagents; empty set if no ofagents exist
62 */
63 Set<OFAgent> ofAgents();
64}