Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2014-present Open Networking Laboratory |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 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 | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 17 | |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 18 | import org.onosproject.net.Provided; |
tom | 43387f3 | 2014-08-27 14:42:43 -0700 | [diff] [blame] | 19 | |
| 20 | /** |
| 21 | * Represents a network topology computation snapshot. |
| 22 | */ |
tom | d1900f3 | 2014-09-03 14:08:16 -0700 | [diff] [blame] | 23 | public interface Topology extends Provided { |
tom | 43387f3 | 2014-08-27 14:42:43 -0700 | [diff] [blame] | 24 | |
tom | 43387f3 | 2014-08-27 14:42:43 -0700 | [diff] [blame] | 25 | /** |
Abhishek Dwaraki | 1e5873e | 2015-03-08 00:01:17 -0500 | [diff] [blame] | 26 | * Returns the time, specified in system nanos of when the topology became |
| 27 | * available. |
tom | 43387f3 | 2014-08-27 14:42:43 -0700 | [diff] [blame] | 28 | * |
Thomas Vachuska | 6b7920d | 2014-11-25 19:48:39 -0800 | [diff] [blame] | 29 | * @return time in system nanos |
tom | 43387f3 | 2014-08-27 14:42:43 -0700 | [diff] [blame] | 30 | */ |
| 31 | long time(); |
| 32 | |
| 33 | /** |
Abhishek Dwaraki | 1e5873e | 2015-03-08 00:01:17 -0500 | [diff] [blame] | 34 | * Returns the time, specified in system millis of when the topology became |
| 35 | * available. |
| 36 | * |
| 37 | * @return time in system nanos |
| 38 | */ |
| 39 | long creationTime(); |
| 40 | |
| 41 | /** |
| 42 | * Returns the time, specified in system nanos of how long the topology took |
| 43 | * to compute. |
Thomas Vachuska | 6b7920d | 2014-11-25 19:48:39 -0800 | [diff] [blame] | 44 | * |
| 45 | * @return elapsed time in system nanos |
| 46 | */ |
| 47 | long computeCost(); |
| 48 | |
| 49 | /** |
tom | 43387f3 | 2014-08-27 14:42:43 -0700 | [diff] [blame] | 50 | * Returns the number of SCCs (strongly connected components) in the |
| 51 | * topology. |
| 52 | * |
| 53 | * @return number of clusters |
| 54 | */ |
| 55 | int clusterCount(); |
| 56 | |
| 57 | /** |
| 58 | * Returns the number of infrastructure devices in the topology. |
| 59 | * |
| 60 | * @return number of devices |
| 61 | */ |
| 62 | int deviceCount(); |
| 63 | |
tom | 43387f3 | 2014-08-27 14:42:43 -0700 | [diff] [blame] | 64 | /** |
| 65 | * Returns the number of infrastructure links in the topology. |
| 66 | * |
| 67 | * @return number of links |
| 68 | */ |
| 69 | int linkCount(); |
| 70 | |
tom | 43387f3 | 2014-08-27 14:42:43 -0700 | [diff] [blame] | 71 | } |