tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.path; |
| 2 | |
tom | cbefa23 | 2014-09-16 14:17:20 -0700 | [diff] [blame^] | 3 | import org.onlab.onos.net.ElementId; |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 4 | import org.onlab.onos.net.Path; |
| 5 | import org.onlab.onos.net.topology.LinkWeight; |
| 6 | |
| 7 | import java.util.Set; |
| 8 | |
| 9 | /** |
| 10 | * Service for obtaining pre-computed paths or for requesting computation of |
| 11 | * paths using the current topology snapshot. |
| 12 | */ |
| 13 | public interface PathService { |
| 14 | |
| 15 | /** |
| 16 | * Returns the set of all shortest paths, precomputed in terms of hop-count, |
tom | cbefa23 | 2014-09-16 14:17:20 -0700 | [diff] [blame^] | 17 | * between the specified source and destination elements. |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 18 | * |
tom | cbefa23 | 2014-09-16 14:17:20 -0700 | [diff] [blame^] | 19 | * @param src source element |
| 20 | * @param dst destination element |
| 21 | * @return set of all shortest paths between the two elements |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 22 | */ |
tom | cbefa23 | 2014-09-16 14:17:20 -0700 | [diff] [blame^] | 23 | Set<Path> getPaths(ElementId src, ElementId dst); |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 24 | |
| 25 | /** |
| 26 | * Returns the set of all shortest paths, computed using the supplied |
tom | cbefa23 | 2014-09-16 14:17:20 -0700 | [diff] [blame^] | 27 | * edge-weight entity, between the specified source and destination |
| 28 | * network elements. |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 29 | * |
tom | cbefa23 | 2014-09-16 14:17:20 -0700 | [diff] [blame^] | 30 | * @param src source element |
| 31 | * @param dst destination element |
| 32 | * @return set of all shortest paths between the two element |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 33 | */ |
tom | cbefa23 | 2014-09-16 14:17:20 -0700 | [diff] [blame^] | 34 | Set<Path> getPaths(ElementId src, ElementId dst, LinkWeight weight); |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 35 | |
| 36 | } |