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 | */ |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 16 | package org.onlab.onos.net.topology; |
| 17 | |
| 18 | import org.onlab.onos.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 | |
Yuta HIGUCHI | 33b5e76 | 2014-10-16 20:00:04 -0700 | [diff] [blame] | 25 | // FIXME: Following is not true right now. It is actually System.nanoTime(), |
| 26 | // which has no relation to epoch time, wall clock, etc. |
tom | 43387f3 | 2014-08-27 14:42:43 -0700 | [diff] [blame] | 27 | /** |
| 28 | * Returns the time, specified in milliseconds since start of epoch, |
| 29 | * when the topology became active and made available. |
| 30 | * |
| 31 | * @return time in milliseconds since start of epoch |
| 32 | */ |
| 33 | long time(); |
| 34 | |
| 35 | /** |
| 36 | * Returns the number of SCCs (strongly connected components) in the |
| 37 | * topology. |
| 38 | * |
| 39 | * @return number of clusters |
| 40 | */ |
| 41 | int clusterCount(); |
| 42 | |
| 43 | /** |
| 44 | * Returns the number of infrastructure devices in the topology. |
| 45 | * |
| 46 | * @return number of devices |
| 47 | */ |
| 48 | int deviceCount(); |
| 49 | |
| 50 | |
| 51 | /** |
| 52 | * Returns the number of infrastructure links in the topology. |
| 53 | * |
| 54 | * @return number of links |
| 55 | */ |
| 56 | int linkCount(); |
| 57 | |
| 58 | /** |
| 59 | * Returns the number of infrastructure paths computed between devices |
| 60 | * in the topology. This means the number of all the shortest paths |
| 61 | * (hop-count) between all device pairs. |
| 62 | * |
| 63 | * @return number of paths |
| 64 | */ |
| 65 | int pathCount(); |
| 66 | |
| 67 | } |