blob: cb119021f325ee5cb7547d8574e887d4acb911ae [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2014-present Open Networking Laboratory
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -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 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.net.topology;
tomcfde0622014-09-09 11:02:42 -070017
Brian O'Connorabafb502014-12-02 22:26:20 -080018import org.onosproject.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 /**
Abhishek Dwaraki1e5873e2015-03-08 00:01:17 -050026 * Returns the time, specified in system nanos of when the topology became
27 * 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 /**
Abhishek Dwaraki1e5873e2015-03-08 00:01:17 -050034 * 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 Vachuska6b7920d2014-11-25 19:48:39 -080044 *
45 * @return elapsed time in system nanos
46 */
47 long computeCost();
48
49 /**
tom43387f32014-08-27 14:42:43 -070050 * 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
tom43387f32014-08-27 14:42:43 -070064 /**
65 * Returns the number of infrastructure links in the topology.
66 *
67 * @return number of links
68 */
69 int linkCount();
70
tom43387f32014-08-27 14:42:43 -070071}