blob: 8bff0210baeb7005ddae5802192e7853d63029cb [file] [log] [blame]
alshabiba9b2b5d2015-09-23 15:01:47 -07001/*
2 * Copyright 2015 Open Networking Laboratory
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 */
16package org.onosproject.mcast;
17
18import org.onosproject.net.ConnectPoint;
19
20import java.util.List;
21
22/**
23 * A service interface for maintaining multicast information.
24 */
25public interface MulticastRouteTable {
26
27 /**
28 * Adds a route to the information base.
29 *
30 * @param route a multicast route
31 */
32 void add(McastRoute route);
33
34 /**
35 * Removes a route from the information base.
36 *
37 * @param route a multicast route
38 */
39 void remove(McastRoute route);
40
41 /**
42 * Adds a source connection to the route from where the
43 * data stream is originating.
44 *
45 * @param route the multicast route
46 * @param connectPoint a source connect point
47 */
48 void addSource(McastRoute route, ConnectPoint connectPoint);
49
50 /**
51 * Adds a sink to the route to which a data stream should be
52 * sent to.
53 *
54 * @param route a multicast route
55 * @param connectPoint a sink connect point
56 */
57 void addSink(McastRoute route, ConnectPoint connectPoint);
58
59 /**
60 * Removes a source connection from the route.
61 *
62 * @param route the multicast route
63 * @param connectPoint a source connect point
64 */
65 void removeSource(McastRoute route, ConnectPoint connectPoint);
66
67 /**
68 * Removes a sink from the route.
69 *
70 * @param route the multicast route
71 * @param connectPoint a sink connect point
72 */
73 void removeSink(McastRoute route, ConnectPoint connectPoint);
74
75 /**
76 * Find the data source association for this multicast route.
77 *
78 * @param route a multicast route
79 * @return a connect point
80 */
81 ConnectPoint fetchSource(McastRoute route);
82
83 /**
84 * Find the list of sinks for this route.
85 *
86 * @param route a multicast route
87 * @return a list of connect points
88 */
89 List<ConnectPoint> fetchSinks(McastRoute route);
90}