Brian O'Connor | 7cbbbb7 | 2016-04-09 02:13:23 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Foundation |
Brian O'Connor | 7cbbbb7 | 2016-04-09 02:13:23 -0700 | [diff] [blame] | 3 | * |
| 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 | */ |
alshabib | 79e5287 | 2015-12-07 16:01:01 -0800 | [diff] [blame] | 16 | package org.onosproject.net.mcast; |
| 17 | |
| 18 | import org.onosproject.net.ConnectPoint; |
| 19 | import org.onosproject.store.Store; |
| 20 | |
| 21 | import java.util.Set; |
| 22 | |
| 23 | /** |
| 24 | * Entity responsible for storing multicast state information. |
Ray Milkey | 50b1458 | 2017-08-23 09:55:02 -0700 | [diff] [blame] | 25 | * |
| 26 | * @deprecated in 1.11 ("Loon") release. To be moved into an app. |
alshabib | 79e5287 | 2015-12-07 16:01:01 -0800 | [diff] [blame] | 27 | */ |
Ray Milkey | 50b1458 | 2017-08-23 09:55:02 -0700 | [diff] [blame] | 28 | |
| 29 | @Deprecated |
alshabib | 79e5287 | 2015-12-07 16:01:01 -0800 | [diff] [blame] | 30 | public 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 Hart | 07eb041 | 2016-02-08 16:42:29 -0800 | [diff] [blame] | 73 | * Obtains the source for a multicast route. |
alshabib | 79e5287 | 2015-12-07 16:01:01 -0800 | [diff] [blame] | 74 | * |
| 75 | * @param route a multicast route |
| 76 | * @return a connect point |
| 77 | */ |
| 78 | ConnectPoint sourceFor(McastRoute route); |
| 79 | |
| 80 | /** |
Jonathan Hart | 07eb041 | 2016-02-08 16:42:29 -0800 | [diff] [blame] | 81 | * Obtains the sinks for a multicast route. |
alshabib | 79e5287 | 2015-12-07 16:01:01 -0800 | [diff] [blame] | 82 | * |
| 83 | * @param route a multicast route |
| 84 | * @return a set of sinks |
| 85 | */ |
| 86 | Set<ConnectPoint> sinksFor(McastRoute route); |
Jonathan Hart | 07eb041 | 2016-02-08 16:42:29 -0800 | [diff] [blame] | 87 | |
| 88 | /** |
| 89 | * Gets the set of all known multicast routes. |
| 90 | * |
| 91 | * @return set of multicast routes |
| 92 | */ |
| 93 | Set<McastRoute> getRoutes(); |
alshabib | 79e5287 | 2015-12-07 16:01:01 -0800 | [diff] [blame] | 94 | } |