blob: bcb199d4ce2b33babd10c823be170109aafde512 [file] [log] [blame]
tom0eb04ca2014-08-25 14:34:51 -07001package org.onlab.onos.net.topology;
2
tome52ce702014-09-11 00:12:54 -07003import com.google.common.collect.ImmutableMap;
4import com.google.common.collect.ImmutableSet;
5import com.google.common.collect.ImmutableSetMultimap;
tomcfde0622014-09-09 11:02:42 -07006import org.onlab.graph.Graph;
tom0eb04ca2014-08-25 14:34:51 -07007import org.onlab.onos.net.Description;
tomcfde0622014-09-09 11:02:42 -07008import org.onlab.onos.net.DeviceId;
9import org.onlab.onos.net.Link;
tom0eb04ca2014-08-25 14:34:51 -070010
tome52ce702014-09-11 00:12:54 -070011import static org.onlab.graph.GraphPathSearch.Result;
tom0eb04ca2014-08-25 14:34:51 -070012
13/**
14 * Describes attribute(s) of a network topology.
15 */
16public interface TopologyDescription extends Description {
17
18 /**
tomcfde0622014-09-09 11:02:42 -070019 * Returns the creation timestamp of the topology description. This is
20 * expressed in system nanos to allow proper sequencing.
tom0eb04ca2014-08-25 14:34:51 -070021 *
tomcfde0622014-09-09 11:02:42 -070022 * @return topology description creation timestamp
tom0eb04ca2014-08-25 14:34:51 -070023 */
tomcfde0622014-09-09 11:02:42 -070024 long timestamp();
tom0eb04ca2014-08-25 14:34:51 -070025
tomcfde0622014-09-09 11:02:42 -070026 /**
tome52ce702014-09-11 00:12:54 -070027 * Returns the topology graph in immutable form.
tomcfde0622014-09-09 11:02:42 -070028 *
29 * @return network graph
30 */
31 Graph<TopoVertex, TopoEdge> graph();
tomedf06bb2014-08-27 16:22:15 -070032
tomcfde0622014-09-09 11:02:42 -070033 /**
tome52ce702014-09-11 00:12:54 -070034 * Returns an immutable map of path search results for each source device.
tomcfde0622014-09-09 11:02:42 -070035 *
tome52ce702014-09-11 00:12:54 -070036 * @return map of path search result for each source node
tomcfde0622014-09-09 11:02:42 -070037 */
tome52ce702014-09-11 00:12:54 -070038 ImmutableMap<DeviceId, Result<TopoVertex, TopoEdge>> pathsBySource();
tomcfde0622014-09-09 11:02:42 -070039
40 /**
41 * Returns the set of topology SCC clusters.
42 *
43 * @return set of SCC clusters
44 */
tome52ce702014-09-11 00:12:54 -070045 ImmutableSet<TopologyCluster> clusters();
tomcfde0622014-09-09 11:02:42 -070046
47 /**
tome52ce702014-09-11 00:12:54 -070048 * Returns an immutable set multi-map of devices for each cluster.
tomcfde0622014-09-09 11:02:42 -070049 *
tome52ce702014-09-11 00:12:54 -070050 * @return set multi-map of devices that belong to each cluster
tomcfde0622014-09-09 11:02:42 -070051 */
tome52ce702014-09-11 00:12:54 -070052 ImmutableSetMultimap<TopologyCluster, DeviceId> devicesByCluster();
tomcfde0622014-09-09 11:02:42 -070053
54 /**
tome52ce702014-09-11 00:12:54 -070055 * Returns an immutable set multi-map of links for each cluster.
tomcfde0622014-09-09 11:02:42 -070056 *
tome52ce702014-09-11 00:12:54 -070057 * @return set multi-map of links that belong to each cluster
tomcfde0622014-09-09 11:02:42 -070058 */
tome52ce702014-09-11 00:12:54 -070059 ImmutableSetMultimap<TopologyCluster, Link> linksByCluster();
tomedf06bb2014-08-27 16:22:15 -070060
tom0eb04ca2014-08-25 14:34:51 -070061}
tomedf06bb2014-08-27 16:22:15 -070062