tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.topology; |
2 | |||||
tom | e52ce70 | 2014-09-11 00:12:54 -0700 | [diff] [blame^] | 3 | import com.google.common.collect.ImmutableMap; |
4 | import com.google.common.collect.ImmutableSet; | ||||
5 | import com.google.common.collect.ImmutableSetMultimap; | ||||
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 6 | import org.onlab.graph.Graph; |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 7 | import org.onlab.onos.net.Description; |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 8 | import org.onlab.onos.net.DeviceId; |
9 | import org.onlab.onos.net.Link; | ||||
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 10 | |
tom | e52ce70 | 2014-09-11 00:12:54 -0700 | [diff] [blame^] | 11 | import static org.onlab.graph.GraphPathSearch.Result; |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 12 | |
13 | /** | ||||
14 | * Describes attribute(s) of a network topology. | ||||
15 | */ | ||||
16 | public interface TopologyDescription extends Description { | ||||
17 | |||||
18 | /** | ||||
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 19 | * Returns the creation timestamp of the topology description. This is |
20 | * expressed in system nanos to allow proper sequencing. | ||||
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 21 | * |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 22 | * @return topology description creation timestamp |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 23 | */ |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 24 | long timestamp(); |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 25 | |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 26 | /** |
tom | e52ce70 | 2014-09-11 00:12:54 -0700 | [diff] [blame^] | 27 | * Returns the topology graph in immutable form. |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 28 | * |
29 | * @return network graph | ||||
30 | */ | ||||
31 | Graph<TopoVertex, TopoEdge> graph(); | ||||
tom | edf06bb | 2014-08-27 16:22:15 -0700 | [diff] [blame] | 32 | |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 33 | /** |
tom | e52ce70 | 2014-09-11 00:12:54 -0700 | [diff] [blame^] | 34 | * Returns an immutable map of path search results for each source device. |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 35 | * |
tom | e52ce70 | 2014-09-11 00:12:54 -0700 | [diff] [blame^] | 36 | * @return map of path search result for each source node |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 37 | */ |
tom | e52ce70 | 2014-09-11 00:12:54 -0700 | [diff] [blame^] | 38 | ImmutableMap<DeviceId, Result<TopoVertex, TopoEdge>> pathsBySource(); |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 39 | |
40 | /** | ||||
41 | * Returns the set of topology SCC clusters. | ||||
42 | * | ||||
43 | * @return set of SCC clusters | ||||
44 | */ | ||||
tom | e52ce70 | 2014-09-11 00:12:54 -0700 | [diff] [blame^] | 45 | ImmutableSet<TopologyCluster> clusters(); |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 46 | |
47 | /** | ||||
tom | e52ce70 | 2014-09-11 00:12:54 -0700 | [diff] [blame^] | 48 | * Returns an immutable set multi-map of devices for each cluster. |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 49 | * |
tom | e52ce70 | 2014-09-11 00:12:54 -0700 | [diff] [blame^] | 50 | * @return set multi-map of devices that belong to each cluster |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 51 | */ |
tom | e52ce70 | 2014-09-11 00:12:54 -0700 | [diff] [blame^] | 52 | ImmutableSetMultimap<TopologyCluster, DeviceId> devicesByCluster(); |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 53 | |
54 | /** | ||||
tom | e52ce70 | 2014-09-11 00:12:54 -0700 | [diff] [blame^] | 55 | * Returns an immutable set multi-map of links for each cluster. |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 56 | * |
tom | e52ce70 | 2014-09-11 00:12:54 -0700 | [diff] [blame^] | 57 | * @return set multi-map of links that belong to each cluster |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 58 | */ |
tom | e52ce70 | 2014-09-11 00:12:54 -0700 | [diff] [blame^] | 59 | ImmutableSetMultimap<TopologyCluster, Link> linksByCluster(); |
tom | edf06bb | 2014-08-27 16:22:15 -0700 | [diff] [blame] | 60 | |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 61 | } |
tom | edf06bb | 2014-08-27 16:22:15 -0700 | [diff] [blame] | 62 |