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