blob: eb2fac959784a22f2ef0b5527ccf7ac248a6828d [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 Berdeff421802013-01-29 20:28:52 -080045 public List<Link> getLinks(String dpid);
46 public List<Link> getActiveLinks();
Pankaj Berdee73452c2013-01-03 14:57:07 -080047
48 /*
49 * Init with Storage conf
50 */
51 public void init(String conf);
Pankaj Berdeff421802013-01-29 20:28:52 -080052
Pankaj Berdee73452c2013-01-03 14:57:07 -080053}