Package org.onosproject.net.topology
Interface PathService
-
- All Known Implementing Classes:
AbstractPathService
public interface PathService
Service for obtaining pre-computed paths or for requesting computation of paths using the current topology snapshot.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.Set<DisjointPath>
getDisjointPaths(ElementId src, ElementId dst)
Returns the set of all disjoint shortest path pairs between the specified source and destination elements.java.util.Set<DisjointPath>
getDisjointPaths(ElementId src, ElementId dst, java.util.Map<Link,java.lang.Object> riskProfile)
Returns the set of all disjoint shortest path pairs between the specified source and destination elements and taking into consideration the provided risk profile.java.util.Set<DisjointPath>
getDisjointPaths(ElementId src, ElementId dst, LinkWeigher weigher)
Returns the set of all disjoint shortest path pairs between the specified source and destination elements.java.util.Set<DisjointPath>
getDisjointPaths(ElementId src, ElementId dst, LinkWeigher weigher, java.util.Map<Link,java.lang.Object> riskProfile)
Returns the set of all disjoint shortest path pairs between the specified source and destination elements and taking into consideration the provided risk profile.default java.util.stream.Stream<Path>
getKShortestPaths(ElementId src, ElementId dst)
Returns the k-shortest paths between source and destination devices.default java.util.stream.Stream<Path>
getKShortestPaths(ElementId src, ElementId dst, LinkWeigher weigher)
Returns the k-shortest paths between source and destination devices.java.util.Set<Path>
getPaths(ElementId src, ElementId dst)
Returns the set of all shortest paths between the specified source and destination elements.java.util.Set<Path>
getPaths(ElementId src, ElementId dst, LinkWeigher weigher)
Returns the set of all shortest paths between the specified source and destination network elements.
-
-
-
Method Detail
-
getPaths
java.util.Set<Path> getPaths(ElementId src, ElementId dst)
Returns the set of all shortest paths between the specified source and destination elements. The path is computed using the default edge-weight function, which by default is hop-count.- Parameters:
src
- source elementdst
- destination element- Returns:
- set of all shortest paths between the two elements
-
getPaths
java.util.Set<Path> getPaths(ElementId src, ElementId dst, LinkWeigher weigher)
Returns the set of all shortest paths between the specified source and destination network elements. The path is computed using the supplied edge-weight function.- Parameters:
src
- source elementdst
- destination elementweigher
- edge-weight entity- Returns:
- set of all shortest paths between the two element
-
getKShortestPaths
default java.util.stream.Stream<Path> getKShortestPaths(ElementId src, ElementId dst)
Returns the k-shortest paths between source and destination devices.- Parameters:
src
- source devicedst
- destination device- Returns:
- stream of k-shortest paths
-
getKShortestPaths
default java.util.stream.Stream<Path> getKShortestPaths(ElementId src, ElementId dst, LinkWeigher weigher)
Returns the k-shortest paths between source and destination devices.- Parameters:
src
- source devicedst
- destination deviceweigher
- edge-weight entity- Returns:
- stream of k-shortest paths
-
getDisjointPaths
java.util.Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst)
Returns the set of all disjoint shortest path pairs between the specified source and destination elements. The path is computed using the default edge-weight function, which by default is hop-count.- Parameters:
src
- source devicedst
- destination device- Returns:
- set of all shortest paths between the two devices
-
getDisjointPaths
java.util.Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, LinkWeigher weigher)
Returns the set of all disjoint shortest path pairs between the specified source and destination elements. The path is computed using the supplied edge-weight function.- Parameters:
src
- source devicedst
- destination deviceweigher
- edge-weight entity- Returns:
- set of all shortest paths between the two devices
-
getDisjointPaths
java.util.Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, java.util.Map<Link,java.lang.Object> riskProfile)
Returns the set of all disjoint shortest path pairs between the specified source and destination elements and taking into consideration the provided risk profile. The path is computed using the default edge-weight function, which by default is hop-count.- Parameters:
src
- source devicedst
- destination deviceriskProfile
- map of edges to risk profiles- Returns:
- set of all shortest paths between the two devices
-
getDisjointPaths
java.util.Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, LinkWeigher weigher, java.util.Map<Link,java.lang.Object> riskProfile)
Returns the set of all disjoint shortest path pairs between the specified source and destination elements and taking into consideration the provided risk profile. The path is computed using the supplied edge-weight function.- Parameters:
src
- source devicedst
- destination deviceweigher
- edge-weight entityriskProfile
- map of edges to risk profiles- Returns:
- set of all shortest paths between the two devices
-
-