blob: c9c48fb18701882e582ef9626500af335b0b7bfa [file] [log] [blame]
Brian O'Connor7cbbbb72016-04-09 02:13:23 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
Brian O'Connor7cbbbb72016-04-09 02:13:23 -07003 *
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 */
alshabib79e52872015-12-07 16:01:01 -080016package org.onosproject.net.mcast;
17
18import org.onosproject.net.ConnectPoint;
19import org.onosproject.store.Store;
20
21import java.util.Set;
22
23/**
24 * Entity responsible for storing multicast state information.
Ray Milkey50b14582017-08-23 09:55:02 -070025 *
26 * @deprecated in 1.11 ("Loon") release. To be moved into an app.
alshabib79e52872015-12-07 16:01:01 -080027 */
Ray Milkey50b14582017-08-23 09:55:02 -070028
29@Deprecated
alshabib79e52872015-12-07 16:01:01 -080030public interface McastStore extends Store<McastEvent, McastStoreDelegate> {
31
32 enum Type {
33 /**
34 * Adding a route to the mcast rib.
35 */
36 ADD,
37
38 /**
39 * Removing a route from the mcast rib.
40 */
41 REMOVE
42 }
43
44 /**
45 * Updates the store with the route information.
46 *
47 * @param route a multicast route
48 * @param operation an operation
49 */
50 void storeRoute(McastRoute route, Type operation);
51
52 /**
53 * Updates the store with source information for the given route. Only one
54 * source is permitted. Submitting another source will replace the previous
55 * value.
56 *
57 * @param route a multicast route
58 * @param source a source
59 */
60 void storeSource(McastRoute route, ConnectPoint source);
61
62 /**
63 * Updates the store with sink information for a given route. There may be
64 * multiple sinks.
65 *
66 * @param route a multicast route
67 * @param sink a sink
68 * @param operation an operation
69 */
70 void storeSink(McastRoute route, ConnectPoint sink, Type operation);
71
72 /**
Jonathan Hart07eb0412016-02-08 16:42:29 -080073 * Obtains the source for a multicast route.
alshabib79e52872015-12-07 16:01:01 -080074 *
75 * @param route a multicast route
76 * @return a connect point
77 */
78 ConnectPoint sourceFor(McastRoute route);
79
80 /**
Jonathan Hart07eb0412016-02-08 16:42:29 -080081 * Obtains the sinks for a multicast route.
alshabib79e52872015-12-07 16:01:01 -080082 *
83 * @param route a multicast route
84 * @return a set of sinks
85 */
86 Set<ConnectPoint> sinksFor(McastRoute route);
Jonathan Hart07eb0412016-02-08 16:42:29 -080087
88 /**
89 * Gets the set of all known multicast routes.
90 *
91 * @return set of multicast routes
92 */
93 Set<McastRoute> getRoutes();
alshabib79e52872015-12-07 16:01:01 -080094}