blob: 483fbda9c1a44d63a9ed0a28065e91279211c733 [file] [log] [blame]
package net.onrc.onos.ofcontroller.core;
import java.util.List;
import net.floodlightcontroller.routing.Link;
import net.onrc.onos.ofcontroller.linkdiscovery.LinkInfo;
public interface ILinkStorage extends INetMapStorage {
/*
* Init with Storage conf
*/
public void init(String conf);
/*
* Generic operation method
*/
public boolean update(Link link, LinkInfo linkinfo, DM_OPERATION op);
/*
* Link creation
*/
public boolean addLink(Link link);
public boolean addLink(Link link, LinkInfo linfo);
public boolean addLinks(List<Link> links);
/*
* Link deletion
*/
public boolean deleteLink(Link link);
public boolean deleteLinks(List<Link> links);
/*
* Utility method to delete links associated with dpid and port
* If only dpid is used, All links associated for switch are removed
* Useful for port up/down and also switch join/remove events
*/
public boolean deleteLinksOnPort(Long dpid, short port);
/*
* Get Links from Storage
* If dpid and port both are specified specific link is retrieved
* If only dpid is set all links associated with Switch are retrieved
*/
public List<Link> getLinks(Long dpid, short port);
public List<Link> getLinks(String dpid);
public List<Link> getActiveLinks();
public LinkInfo getLinkInfo(Link link);
}