Pankaj Berde | e73452c | 2013-01-03 14:57:07 -0800 | [diff] [blame] | 1 | package net.floodlightcontroller.linkdiscovery; |
| 2 | |
| 3 | import java.util.List; |
| 4 | |
| 5 | import net.floodlightcontroller.core.INetMapStorage; |
| 6 | import net.floodlightcontroller.routing.Link; |
| 7 | |
| 8 | public interface ILinkStorage extends INetMapStorage { |
| 9 | |
| 10 | /* |
| 11 | * Link creation |
| 12 | */ |
| 13 | public void update(Link link, DM_OPERATION op); |
| 14 | public void update(List<Link> List, DM_OPERATION op); |
| 15 | |
| 16 | /* |
| 17 | * Add Linkinfo |
| 18 | */ |
| 19 | public void update(Link link, LinkInfo linkinfo, DM_OPERATION op); |
| 20 | |
| 21 | /* |
| 22 | * Get Links from Storage |
| 23 | * If dpid and port both are specified specific link is retrieved |
| 24 | * If only dpid is set all links associated with Switch are retrieved |
| 25 | */ |
| 26 | public List<Link> getLinks(Long dpid, int port); |
| 27 | |
| 28 | /* |
| 29 | * Delete links associated with dpid and port |
| 30 | * If only dpid is used, All links associated for switch are removed |
| 31 | * Useful for port up/down and also switch join/remove events |
| 32 | */ |
| 33 | public void deleteLinks(Long dpid, int port); |
| 34 | |
| 35 | /* |
| 36 | * Init with Storage conf |
| 37 | */ |
| 38 | public void init(String conf); |
| 39 | } |