Package org.onosproject.net.topology
Interface TopologyStore
-
- All Superinterfaces:
Store<TopologyEvent,TopologyStoreDelegate>
public interface TopologyStore extends Store<TopologyEvent,TopologyStoreDelegate>
Manages inventory of topology snapshots; not intended for direct use.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Topology
currentTopology()
Returns the current topology snapshot.TopologyCluster
getCluster(Topology topology, ClusterId clusterId)
Returns the cluster of the specified topology.Set<DeviceId>
getClusterDevices(Topology topology, TopologyCluster cluster)
Returns the cluster of the specified topology.Set<Link>
getClusterLinks(Topology topology, TopologyCluster cluster)
Returns the cluster of the specified topology.Set<TopologyCluster>
getClusters(Topology topology)
Returns the set of topology SCC clusters.Set<DisjointPath>
getDisjointPaths(Topology topology, DeviceId src, DeviceId dst)
Computes and returns the set of disjoint shortest path pairs between src and dst.Set<DisjointPath>
getDisjointPaths(Topology topology, DeviceId src, DeviceId dst, Map<Link,Object> riskProfile)
Returns the set of pre-computed SRLG shortest paths between src and dest.Set<DisjointPath>
getDisjointPaths(Topology topology, DeviceId src, DeviceId dst, LinkWeigher weigher)
Computes and returns the set of disjoint shortest path pairs between src and dst.Set<DisjointPath>
getDisjointPaths(Topology topology, DeviceId src, DeviceId dst, LinkWeigher weigher, Map<Link,Object> riskProfile)
Computes and returns the set of SRLG disjoint shortest path pairs between source and dst, given a mapping of edges to SRLG risk groups.TopologyGraph
getGraph(Topology topology)
Returns the immutable graph view of the current topology.default Stream<Path>
getKShortestPaths(Topology topology, DeviceId src, DeviceId dst, LinkWeigher weigher)
Computes and returns the k-shortest paths between source and destination devices.default Set<Path>
getKShortestPaths(Topology topology, DeviceId src, DeviceId dst, LinkWeigher weigher, int maxPaths)
Computes and returns the k-shortest paths between source and destination devices.Set<Path>
getPaths(Topology topology, DeviceId src, DeviceId dst)
Returns the set of pre-computed shortest paths between src and dest.Set<Path>
getPaths(Topology topology, DeviceId src, DeviceId dst, LinkWeigher weigher)
Computes and returns the set of shortest paths between src and dest.boolean
isBroadcastPoint(Topology topology, ConnectPoint connectPoint)
Indicates whether broadcast is allowed for traffic received on the given connection point.boolean
isInfrastructure(Topology topology, ConnectPoint connectPoint)
Indicates whether the given connect point is part of the network fabric.boolean
isLatest(Topology topology)
Indicates whether the topology is the latest.TopologyEvent
updateTopology(ProviderId providerId, GraphDescription graphDescription, List<Event> reasons)
Generates a new topology snapshot from the specified description.-
Methods inherited from interface org.onosproject.store.Store
hasDelegate, setDelegate, unsetDelegate
-
-
-
-
Method Detail
-
currentTopology
Topology currentTopology()
Returns the current topology snapshot.- Returns:
- current topology descriptor
-
isLatest
boolean isLatest(Topology topology)
Indicates whether the topology is the latest.- Parameters:
topology
- topology descriptor- Returns:
- true if topology is the most recent one
-
getGraph
TopologyGraph getGraph(Topology topology)
Returns the immutable graph view of the current topology.- Parameters:
topology
- topology descriptor- Returns:
- graph view
-
getClusters
Set<TopologyCluster> getClusters(Topology topology)
Returns the set of topology SCC clusters.- Parameters:
topology
- topology descriptor- Returns:
- set of clusters
-
getCluster
TopologyCluster getCluster(Topology topology, ClusterId clusterId)
Returns the cluster of the specified topology.- Parameters:
topology
- topology descriptorclusterId
- cluster identity- Returns:
- topology cluster
-
getClusterDevices
Set<DeviceId> getClusterDevices(Topology topology, TopologyCluster cluster)
Returns the cluster of the specified topology.- Parameters:
topology
- topology descriptorcluster
- topology cluster- Returns:
- set of cluster links
-
getClusterLinks
Set<Link> getClusterLinks(Topology topology, TopologyCluster cluster)
Returns the cluster of the specified topology.- Parameters:
topology
- topology descriptorcluster
- topology cluster- Returns:
- set of cluster links
-
getPaths
Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst)
Returns the set of pre-computed shortest paths between src and dest.- Parameters:
topology
- topology descriptorsrc
- source devicedst
- destination device- Returns:
- set of shortest paths
-
getPaths
Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst, LinkWeigher weigher)
Computes and returns the set of shortest paths between src and dest.- Parameters:
topology
- topology descriptorsrc
- source devicedst
- destination deviceweigher
- link weight function- Returns:
- set of shortest paths
-
getKShortestPaths
default Set<Path> getKShortestPaths(Topology topology, DeviceId src, DeviceId dst, LinkWeigher weigher, int maxPaths)
Computes and returns the k-shortest paths between source and destination devices. The firstmaxPaths
paths will be returned in ascending order according to the providedweigher
- Parameters:
topology
- topology descriptorsrc
- source devicedst
- destination deviceweigher
- edge-weight entitymaxPaths
- maximum number of paths (k)- Returns:
- set of k-shortest paths
-
getKShortestPaths
default Stream<Path> getKShortestPaths(Topology topology, DeviceId src, DeviceId dst, LinkWeigher weigher)
Computes and returns the k-shortest paths between source and destination devices.- Parameters:
topology
- topology descriptorsrc
- source devicedst
- destination deviceweigher
- edge-weight entity- Returns:
- stream of k-shortest paths
-
getDisjointPaths
Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst, LinkWeigher weigher)
Computes and returns the set of disjoint shortest path pairs between src and dst.- Parameters:
topology
- topology descriptorsrc
- source devicedst
- destination deviceweigher
- link weight function- Returns:
- set of shortest paths
-
getDisjointPaths
Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst)
Computes and returns the set of disjoint shortest path pairs between src and dst.- Parameters:
topology
- topology descriptorsrc
- source devicedst
- destination device- Returns:
- set of shortest paths
-
getDisjointPaths
Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst, LinkWeigher weigher, Map<Link,Object> riskProfile)
Computes and returns the set of SRLG disjoint shortest path pairs between source and dst, given a mapping of edges to SRLG risk groups.- Parameters:
topology
- topology descriptorsrc
- source devicedst
- destination deviceweigher
- link weight functionriskProfile
- map of edges to objects. Edges that map to the same object will be treated as if they were in the same risk group.- Returns:
- set of shortest paths
-
getDisjointPaths
Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst, Map<Link,Object> riskProfile)
Returns the set of pre-computed SRLG shortest paths between src and dest.- Parameters:
topology
- topology descriptorsrc
- source devicedst
- destination deviceriskProfile
- map of edges to objects. Edges that map to the same object will be treated as if they were in the same risk group.- Returns:
- set of shortest paths
-
isInfrastructure
boolean isInfrastructure(Topology topology, ConnectPoint connectPoint)
Indicates whether the given connect point is part of the network fabric.- Parameters:
topology
- topology descriptorconnectPoint
- connection point- Returns:
- true if infrastructure; false otherwise
-
isBroadcastPoint
boolean isBroadcastPoint(Topology topology, ConnectPoint connectPoint)
Indicates whether broadcast is allowed for traffic received on the given connection point.- Parameters:
topology
- topology descriptorconnectPoint
- connection point- Returns:
- true if broadcast allowed; false otherwise
-
updateTopology
TopologyEvent updateTopology(ProviderId providerId, GraphDescription graphDescription, List<Event> reasons)
Generates a new topology snapshot from the specified description.- Parameters:
providerId
- provider identificationgraphDescription
- topology graph descriptionreasons
- list of events that triggered the update- Returns:
- topology update event or null if the description is old
-
-