blob: a764227aa21b0addd536955202bf7a1de6969368 [file] [log] [blame]
Pankaj Berdee73452c2013-01-03 14:57:07 -08001package net.floodlightcontroller.linkdiscovery;
2
3import java.util.List;
4
5import net.floodlightcontroller.core.INetMapStorage;
6import net.floodlightcontroller.routing.Link;
7
8public interface ILinkStorage extends INetMapStorage {
9
10 /*
11 * Link creation
12 */
13 public void update(Link link, DM_OPERATION op);
Umesh Krishnaswamyf962d642013-01-23 19:04:23 -080014 public void update(Link link, LinkInfo linkinfo, DM_OPERATION op);
Pankaj Berdee73452c2013-01-03 14:57:07 -080015 public void update(List<Link> List, DM_OPERATION op);
Umesh Krishnaswamyf962d642013-01-23 19:04:23 -080016
Pankaj Berdee73452c2013-01-03 14:57:07 -080017 /*
18 * Add Linkinfo
19 */
Umesh Krishnaswamyf962d642013-01-23 19:04:23 -080020 public void addOrUpdateLink (Link link, LinkInfo linkinfo, DM_OPERATION op);
Pankaj Berdee73452c2013-01-03 14:57:07 -080021
22 /*
Umesh Krishnaswamyf962d642013-01-23 19:04:23 -080023 * Delete a single link
Pankaj Berdee73452c2013-01-03 14:57:07 -080024 */
Umesh Krishnaswamyf962d642013-01-23 19:04:23 -080025 public void deleteLink(Link link);
Pankaj Berdee73452c2013-01-03 14:57:07 -080026
27 /*
28 * Delete links associated with dpid and port
29 * If only dpid is used, All links associated for switch are removed
30 * Useful for port up/down and also switch join/remove events
31 */
Umesh Krishnaswamyf962d642013-01-23 19:04:23 -080032 public void deleteLinksOnPort(Long dpid, short port);
33
34 /*
35 * Delete a list of links
36 */
37 public void deleteLinks(List<Link> links);
38
39 /*
40 * Get Links from Storage
41 * If dpid and port both are specified specific link is retrieved
42 * If only dpid is set all links associated with Switch are retrieved
43 */
44 public List<Link> getLinks(Long dpid, short port);
Pankaj Berdee73452c2013-01-03 14:57:07 -080045
46 /*
47 * Init with Storage conf
48 */
49 public void init(String conf);
50}