blob: 182db10ca1a63cff556f162bb73b0b5f2ba28464 [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 */
tomcfde0622014-09-09 11:02:42 -070016package org.onlab.onos.net.topology;
17
18import org.onlab.onos.net.Provided;
tom43387f32014-08-27 14:42:43 -070019
20/**
21 * Represents a network topology computation snapshot.
22 */
tomd1900f32014-09-03 14:08:16 -070023public interface Topology extends Provided {
tom43387f32014-08-27 14:42:43 -070024
tom43387f32014-08-27 14:42:43 -070025 /**
Thomas Vachuska6b7920d2014-11-25 19:48:39 -080026 * Returns the time, specified in system nanos of when the topology
27 * became available.
tom43387f32014-08-27 14:42:43 -070028 *
Thomas Vachuska6b7920d2014-11-25 19:48:39 -080029 * @return time in system nanos
tom43387f32014-08-27 14:42:43 -070030 */
31 long time();
32
33 /**
Thomas Vachuska6b7920d2014-11-25 19:48:39 -080034 * Returns the time, specified in system nanos of how long the topology
35 * took to compute.
36 *
37 * @return elapsed time in system nanos
38 */
39 long computeCost();
40
41 /**
tom43387f32014-08-27 14:42:43 -070042 * Returns the number of SCCs (strongly connected components) in the
43 * topology.
44 *
45 * @return number of clusters
46 */
47 int clusterCount();
48
49 /**
50 * Returns the number of infrastructure devices in the topology.
51 *
52 * @return number of devices
53 */
54 int deviceCount();
55
56
57 /**
58 * Returns the number of infrastructure links in the topology.
59 *
60 * @return number of links
61 */
62 int linkCount();
63
64 /**
65 * Returns the number of infrastructure paths computed between devices
66 * in the topology. This means the number of all the shortest paths
67 * (hop-count) between all device pairs.
68 *
69 * @return number of paths
70 */
71 int pathCount();
72
73}