Class AbstractPathService

  • All Implemented Interfaces:
    PathService

    public abstract class AbstractPathService
    extends Object
    implements PathService
    Helper class for path service.

    Class inheriting this must manually initialize topologyService and hostService fields.

    • Constructor Detail

      • AbstractPathService

        public AbstractPathService()
    • Method Detail

      • getPaths

        public 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 interface PathService
        Parameters:
        src - source element
        dst - destination element
        weigher - edge-weight entity
        Returns:
        set of all shortest paths between the two element
      • getKShortestPaths

        public 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 interface PathService
        Parameters:
        src - source device
        dst - destination device
        weigher - edge-weight entity
        Returns:
        stream of k-shortest paths
      • getDisjointPaths

        public 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 interface PathService
        Parameters:
        src - source device
        dst - destination device
        weigher - edge-weight entity
        Returns:
        set of all shortest paths between the two devices
      • getDisjointPaths

        public Set<DisjointPath> getDisjointPaths​(ElementId src,
                                                  ElementId dst,
                                                  LinkWeigher weigher,
                                                  Map<Link,​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 interface PathService
        Parameters:
        src - source device
        dst - destination device
        weigher - edge-weight entity
        riskProfile - map of edges to risk profiles
        Returns:
        set of all shortest paths between the two devices