blob: d41b4ee6bc67724544c58f791692e56a5a3393f5 [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
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'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.net.topology;
tom4774c8f2014-09-16 11:17:08 -070017
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070018import org.onosproject.net.DisjointPath;
Brian O'Connorabafb502014-12-02 22:26:20 -080019import org.onosproject.net.ElementId;
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070020import org.onosproject.net.Link;
Brian O'Connorabafb502014-12-02 22:26:20 -080021import org.onosproject.net.Path;
tom4774c8f2014-09-16 11:17:08 -070022
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070023import java.util.Map;
tom4774c8f2014-09-16 11:17:08 -070024import 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 */
30public interface PathService {
31
32 /**
33 * Returns the set of all shortest paths, precomputed in terms of hop-count,
tomcbefa232014-09-16 14:17:20 -070034 * between the specified source and destination elements.
tom4774c8f2014-09-16 11:17:08 -070035 *
tomcbefa232014-09-16 14:17:20 -070036 * @param src source element
37 * @param dst destination element
38 * @return set of all shortest paths between the two elements
tom4774c8f2014-09-16 11:17:08 -070039 */
tomcbefa232014-09-16 14:17:20 -070040 Set<Path> getPaths(ElementId src, ElementId dst);
tom4774c8f2014-09-16 11:17:08 -070041
42 /**
43 * Returns the set of all shortest paths, computed using the supplied
tomcbefa232014-09-16 14:17:20 -070044 * edge-weight entity, between the specified source and destination
45 * network elements.
tom4774c8f2014-09-16 11:17:08 -070046 *
tomcbefa232014-09-16 14:17:20 -070047 * @param src source element
48 * @param dst destination element
Yuta HIGUCHI5c947272014-11-03 21:39:21 -080049 * @param weight edge-weight entity
tomcbefa232014-09-16 14:17:20 -070050 * @return set of all shortest paths between the two element
tom4774c8f2014-09-16 11:17:08 -070051 */
tomcbefa232014-09-16 14:17:20 -070052 Set<Path> getPaths(ElementId src, ElementId dst, LinkWeight weight);
tom4774c8f2014-09-16 11:17:08 -070053
Nikhil Cheerla2ec191f2015-07-09 12:34:54 -070054 /**
55 * Returns the set of all disjoint shortest path pairs, precomputed in terms of hop-count,
56 * between the specified source and destination devices.
57 *
58 * @param src source device
59 * @param dst destination device
60 * @return set of all shortest paths between the two devices
61 */
62 Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst);
63
64 /**
65 * Returns the set of all disjoint shortest path pairs, computed using the supplied
66 * edge-weight entity, between the specified source and destination devices.
67 *
68 * @param src source device
69 * @param dst destination device
70 * @param weight edge-weight entity
71 * @return set of all shortest paths between the two devices
72 */
73 Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
74 LinkWeight weight);
75
76 /**
77 * Returns the set of all disjoint shortest path pairs, precomputed in terms of hop-count,
78 * between the specified source and destination devices.
79 *
80 * @param src source device
81 * @param dst destination device
82 * @param riskProfile map of edges to risk profiles
83 * @return set of all shortest paths between the two devices
84 */
85 Set<DisjointPath> getSRLGDisjointPaths(ElementId src, ElementId dst,
86 Map<Link, Object> riskProfile);
87
88 /**
89 * Returns the set of all disjoint shortest path pairs, precomputed in terms of hop-count,
90 * between the specified source and destination devices.
91 *
92 * @param src source device
93 * @param dst destination device
94 * @param weight edge-weight entity
95 * @param riskProfile map of edges to risk profiles
96 * @return set of all shortest paths between the two devices
97 */
98 Set<DisjointPath> getSRLGDisjointPaths(ElementId src, ElementId dst,
99 LinkWeight weight, Map<Link, Object> riskProfile);
100
tom4774c8f2014-09-16 11:17:08 -0700101}