blob: 96b21f6c0703aee46e8547936f6de276d9d220fa [file] [log] [blame]
alshabib79e52872015-12-07 16:01:01 -08001package org.onosproject.net.mcast;
2
3import org.onosproject.net.ConnectPoint;
4import org.onosproject.store.Store;
5
6import java.util.Set;
7
8/**
9 * Entity responsible for storing multicast state information.
10 */
11public interface McastStore extends Store<McastEvent, McastStoreDelegate> {
12
13 enum Type {
14 /**
15 * Adding a route to the mcast rib.
16 */
17 ADD,
18
19 /**
20 * Removing a route from the mcast rib.
21 */
22 REMOVE
23 }
24
25 /**
26 * Updates the store with the route information.
27 *
28 * @param route a multicast route
29 * @param operation an operation
30 */
31 void storeRoute(McastRoute route, Type operation);
32
33 /**
34 * Updates the store with source information for the given route. Only one
35 * source is permitted. Submitting another source will replace the previous
36 * value.
37 *
38 * @param route a multicast route
39 * @param source a source
40 */
41 void storeSource(McastRoute route, ConnectPoint source);
42
43 /**
44 * Updates the store with sink information for a given route. There may be
45 * multiple sinks.
46 *
47 * @param route a multicast route
48 * @param sink a sink
49 * @param operation an operation
50 */
51 void storeSink(McastRoute route, ConnectPoint sink, Type operation);
52
53 /**
54 * Obtain the source for a multicast route.
55 *
56 * @param route a multicast route
57 * @return a connect point
58 */
59 ConnectPoint sourceFor(McastRoute route);
60
61 /**
62 * Obtain the sinks for a multicast route.
63 *
64 * @param route a multicast route
65 * @return a set of sinks
66 */
67 Set<ConnectPoint> sinksFor(McastRoute route);
68}