Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 Open Networking Laboratory |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.net.topology; |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 17 | |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 18 | import org.onosproject.net.DisjointPath; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 19 | import org.onosproject.net.ElementId; |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 20 | import org.onosproject.net.Link; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 21 | import org.onosproject.net.Path; |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 22 | |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 23 | import java.util.Map; |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 24 | import java.util.Set; |
| 25 | |
| 26 | /** |
| 27 | * Service for obtaining pre-computed paths or for requesting computation of |
| 28 | * paths using the current topology snapshot. |
| 29 | */ |
| 30 | public interface PathService { |
| 31 | |
| 32 | /** |
Thomas Vachuska | 41fe1ec | 2015-12-03 23:17:02 -0800 | [diff] [blame] | 33 | * Returns the set of all shortest paths between the specified source and |
| 34 | * destination elements. The path is computed using the default edge-weight |
| 35 | * function, which by default is hop-count. |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 36 | * |
tom | cbefa23 | 2014-09-16 14:17:20 -0700 | [diff] [blame] | 37 | * @param src source element |
| 38 | * @param dst destination element |
| 39 | * @return set of all shortest paths between the two elements |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 40 | */ |
tom | cbefa23 | 2014-09-16 14:17:20 -0700 | [diff] [blame] | 41 | Set<Path> getPaths(ElementId src, ElementId dst); |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 42 | |
| 43 | /** |
Thomas Vachuska | 41fe1ec | 2015-12-03 23:17:02 -0800 | [diff] [blame] | 44 | * Returns the set of all shortest paths between the specified source and |
| 45 | * destination network elements. The path is computed using the supplied |
| 46 | * edge-weight function. |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 47 | * |
Thomas Vachuska | 48e64e4 | 2015-09-22 15:32:55 -0700 | [diff] [blame] | 48 | * @param src source element |
| 49 | * @param dst destination element |
Yuta HIGUCHI | 5c94727 | 2014-11-03 21:39:21 -0800 | [diff] [blame] | 50 | * @param weight edge-weight entity |
tom | cbefa23 | 2014-09-16 14:17:20 -0700 | [diff] [blame] | 51 | * @return set of all shortest paths between the two element |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 52 | */ |
tom | cbefa23 | 2014-09-16 14:17:20 -0700 | [diff] [blame] | 53 | Set<Path> getPaths(ElementId src, ElementId dst, LinkWeight weight); |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 54 | |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 55 | /** |
Thomas Vachuska | 41fe1ec | 2015-12-03 23:17:02 -0800 | [diff] [blame] | 56 | * Returns the set of all disjoint shortest path pairs between the |
| 57 | * specified source and destination elements. The path is computed using |
| 58 | * the default edge-weight function, which by default is hop-count. |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 59 | * |
Thomas Vachuska | 48e64e4 | 2015-09-22 15:32:55 -0700 | [diff] [blame] | 60 | * @param src source device |
| 61 | * @param dst destination device |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 62 | * @return set of all shortest paths between the two devices |
| 63 | */ |
| 64 | Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst); |
| 65 | |
| 66 | /** |
Thomas Vachuska | 41fe1ec | 2015-12-03 23:17:02 -0800 | [diff] [blame] | 67 | * Returns the set of all disjoint shortest path pairs between the |
| 68 | * specified source and destination elements. The path is computed using |
| 69 | * the supplied edge-weight function. |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 70 | * |
Thomas Vachuska | 48e64e4 | 2015-09-22 15:32:55 -0700 | [diff] [blame] | 71 | * @param src source device |
| 72 | * @param dst destination device |
| 73 | * @param weight edge-weight entity |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 74 | * @return set of all shortest paths between the two devices |
| 75 | */ |
| 76 | Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, |
| 77 | LinkWeight weight); |
| 78 | |
| 79 | /** |
Thomas Vachuska | 41fe1ec | 2015-12-03 23:17:02 -0800 | [diff] [blame] | 80 | * Returns the set of all disjoint shortest path pairs between the |
| 81 | * specified source and destination elements and taking into consideration |
| 82 | * the provided risk profile. The path is computed using the default |
| 83 | * edge-weight function, which by default is hop-count. |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 84 | * |
Thomas Vachuska | 48e64e4 | 2015-09-22 15:32:55 -0700 | [diff] [blame] | 85 | * @param src source device |
| 86 | * @param dst destination device |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 87 | * @param riskProfile map of edges to risk profiles |
| 88 | * @return set of all shortest paths between the two devices |
| 89 | */ |
Thomas Vachuska | 48e64e4 | 2015-09-22 15:32:55 -0700 | [diff] [blame] | 90 | Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, |
| 91 | Map<Link, Object> riskProfile); |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 92 | |
| 93 | /** |
Thomas Vachuska | 41fe1ec | 2015-12-03 23:17:02 -0800 | [diff] [blame] | 94 | * Returns the set of all disjoint shortest path pairs between the |
| 95 | * specified source and destination elements and taking into consideration |
| 96 | * the provided risk profile. The path is computed using the supplied |
| 97 | * edge-weight function. |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 98 | * |
Thomas Vachuska | 48e64e4 | 2015-09-22 15:32:55 -0700 | [diff] [blame] | 99 | * @param src source device |
| 100 | * @param dst destination device |
| 101 | * @param weight edge-weight entity |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 102 | * @param riskProfile map of edges to risk profiles |
| 103 | * @return set of all shortest paths between the two devices |
| 104 | */ |
Thomas Vachuska | 48e64e4 | 2015-09-22 15:32:55 -0700 | [diff] [blame] | 105 | Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, |
Thomas Vachuska | 41fe1ec | 2015-12-03 23:17:02 -0800 | [diff] [blame] | 106 | LinkWeight weight, |
| 107 | Map<Link, Object> riskProfile); |
Nikhil Cheerla | 2ec191f | 2015-07-09 12:34:54 -0700 | [diff] [blame] | 108 | |
tom | 4774c8f | 2014-09-16 11:17:08 -0700 | [diff] [blame] | 109 | } |