blob: 39237eae5a0e25d6a7eff798e2a8b6e25531cade [file] [log] [blame]
Nikhil Cheerla1cf0f9a2015-07-09 12:26:48 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Nikhil Cheerla1cf0f9a2015-07-09 12:26:48 -07003 *
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 */
16
17package org.onosproject.net;
18
19
20/**
21 * Representation of a contiguous directed path in a network. Path comprises
22 * of a sequence of links, where adjacent links must share the same device,
23 * meaning that destination of the source of one link must coincide with the
24 * destination of the previous link.
25 */
26public interface DisjointPath extends Path {
27
28 /**
29 * Uses backup path.
30 *
31 * @return boolean corresponding to whether request to use
32 * backup was successful.
33 */
34 boolean useBackup();
35
36 /**
37 * Gets primary path.
38 *
39 * @return primary path
40 */
41 Path primary();
42
43 /**
44 * Gets secondary path.
45 *
Yuta HIGUCHIc3d69f52016-08-08 11:52:52 -070046 * @return secondary path, or null if there is no secondary path available.
Nikhil Cheerla1cf0f9a2015-07-09 12:26:48 -070047 */
48 Path backup();
49}