Package org.onosproject.net.topology
Class AbstractPathService
- java.lang.Object
-
- org.onosproject.net.topology.AbstractPathService
-
- All Implemented Interfaces:
PathService
public abstract class AbstractPathService extends java.lang.Object implements PathService
Helper class for path service.Class inheriting this must manually initialize
topologyService
andhostService
fields.
-
-
Field Summary
Fields Modifier and Type Field Description protected static LinkWeigher
DEFAULT_WEIGHER
protected HostService
hostService
protected TopologyService
topologyService
-
Constructor Summary
Constructors Constructor Description AbstractPathService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.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, LinkWeigher weigher)
Returns the set of all shortest paths between the specified source and destination network elements.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.onosproject.net.topology.PathService
getDisjointPaths, getDisjointPaths, getKShortestPaths, getPaths
-
-
-
-
Field Detail
-
DEFAULT_WEIGHER
protected static final LinkWeigher DEFAULT_WEIGHER
-
topologyService
protected TopologyService topologyService
-
hostService
protected HostService hostService
-
-
Method Detail
-
getPaths
public java.util.Set<Path> getPaths(ElementId src, ElementId dst, LinkWeigher weigher)
Description copied from interface:PathService
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.- Specified by:
getPaths
in interfacePathService
- Parameters:
src
- source elementdst
- destination elementweigher
- edge-weight entity- Returns:
- set of all shortest paths between the two element
-
getKShortestPaths
public java.util.stream.Stream<Path> getKShortestPaths(ElementId src, ElementId dst, LinkWeigher weigher)
Description copied from interface:PathService
Returns the k-shortest paths between source and destination devices.- Specified by:
getKShortestPaths
in interfacePathService
- Parameters:
src
- source devicedst
- destination deviceweigher
- edge-weight entity- Returns:
- stream of k-shortest paths
-
getDisjointPaths
public java.util.Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, LinkWeigher weigher)
Description copied from interface:PathService
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.- Specified by:
getDisjointPaths
in interfacePathService
- Parameters:
src
- source devicedst
- destination deviceweigher
- edge-weight entity- Returns:
- set of all shortest paths between the two devices
-
getDisjointPaths
public java.util.Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, LinkWeigher weigher, java.util.Map<Link,java.lang.Object> riskProfile)
Description copied from interface:PathService
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.- Specified by:
getDisjointPaths
in interfacePathService
- 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
-
-