Package org.onosproject.net.link
Interface LinkStore
-
- All Superinterfaces:
Store<LinkEvent,LinkStoreDelegate>
public interface LinkStore extends Store<LinkEvent,LinkStoreDelegate>
Manages inventory of infrastructure links; not intended for direct use.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LinkEvent
createOrUpdateLink(ProviderId providerId, LinkDescription linkDescription)
Creates a new link, or updates an existing one, based on the given information.java.util.Set<Link>
getDeviceEgressLinks(DeviceId deviceId)
Returns all links egressing from the specified device.java.util.Set<Link>
getDeviceIngressLinks(DeviceId deviceId)
Returns all links ingressing from the specified device.java.util.Set<Link>
getEgressLinks(ConnectPoint src)
Returns all links egressing from the specified connection point.java.util.Set<Link>
getIngressLinks(ConnectPoint dst)
Returns all links ingressing to the specified connection point.Link
getLink(ConnectPoint src, ConnectPoint dst)
Returns the link between the two end-points.int
getLinkCount()
Returns the number of links in the store.java.lang.Iterable<Link>
getLinks()
Returns an iterable collection of all links in the inventory.LinkEvent
removeLink(ConnectPoint src, ConnectPoint dst)
Removes the link based on the specified information.LinkEvent
removeOrDownLink(ConnectPoint src, ConnectPoint dst)
Removes the link, or marks it as inactive if the link is durable, based on the specified information.-
Methods inherited from interface org.onosproject.store.Store
hasDelegate, setDelegate, unsetDelegate
-
-
-
-
Method Detail
-
getLinkCount
int getLinkCount()
Returns the number of links in the store.- Returns:
- number of links
-
getLinks
java.lang.Iterable<Link> getLinks()
Returns an iterable collection of all links in the inventory.- Returns:
- collection of all links
-
getDeviceEgressLinks
java.util.Set<Link> getDeviceEgressLinks(DeviceId deviceId)
Returns all links egressing from the specified device.- Parameters:
deviceId
- device identifier- Returns:
- set of device links
-
getDeviceIngressLinks
java.util.Set<Link> getDeviceIngressLinks(DeviceId deviceId)
Returns all links ingressing from the specified device.- Parameters:
deviceId
- device identifier- Returns:
- set of device links
-
getLink
Link getLink(ConnectPoint src, ConnectPoint dst)
Returns the link between the two end-points.- Parameters:
src
- source connection pointdst
- destination connection point- Returns:
- link or null if one not found between the end-points
-
getEgressLinks
java.util.Set<Link> getEgressLinks(ConnectPoint src)
Returns all links egressing from the specified connection point.- Parameters:
src
- source connection point- Returns:
- set of connection point links
-
getIngressLinks
java.util.Set<Link> getIngressLinks(ConnectPoint dst)
Returns all links ingressing to the specified connection point.- Parameters:
dst
- destination connection point- Returns:
- set of connection point links
-
createOrUpdateLink
LinkEvent createOrUpdateLink(ProviderId providerId, LinkDescription linkDescription)
Creates a new link, or updates an existing one, based on the given information.- Parameters:
providerId
- provider identitylinkDescription
- link description- Returns:
- create or update link event, or null if no change resulted
-
removeOrDownLink
LinkEvent removeOrDownLink(ConnectPoint src, ConnectPoint dst)
Removes the link, or marks it as inactive if the link is durable, based on the specified information.- Parameters:
src
- link sourcedst
- link destination- Returns:
- remove or update link event, or null if no change resulted
-
removeLink
LinkEvent removeLink(ConnectPoint src, ConnectPoint dst)
Removes the link based on the specified information.- Parameters:
src
- link sourcedst
- link destination- Returns:
- remove link event, or null if no change resulted
-
-