public class DefaultTopology
extends org.onosproject.net.AbstractModel
implements org.onosproject.net.topology.Topology
| Constructor and Description |
|---|
DefaultTopology(org.onosproject.net.provider.ProviderId providerId,
org.onosproject.net.topology.GraphDescription description)
Creates a topology descriptor attributed to the specified provider.
|
DefaultTopology(org.onosproject.net.provider.ProviderId providerId,
org.onosproject.net.topology.GraphDescription description,
com.google.common.base.Function<org.onosproject.net.ConnectPoint,Boolean> broadcastFunction)
Creates a topology descriptor attributed to the specified provider.
|
| Modifier and Type | Method and Description |
|---|---|
Set<org.onosproject.net.ConnectPoint> |
broadcastPoints(org.onosproject.net.topology.ClusterId clusterId)
Returns the set of the cluster broadcast points.
|
int |
broadcastSetSize(org.onosproject.net.topology.ClusterId clusterId)
Returns the size of the cluster broadcast set.
|
int |
clusterCount() |
long |
computeCost() |
long |
creationTime() |
int |
deviceCount() |
org.onosproject.net.topology.TopologyCluster |
getCluster(org.onosproject.net.topology.ClusterId clusterId)
Returns the specified topology cluster.
|
org.onosproject.net.topology.TopologyCluster |
getCluster(org.onosproject.net.DeviceId deviceId)
Returns the topology cluster that contains the given device.
|
Set<org.onosproject.net.DeviceId> |
getClusterDevices(org.onosproject.net.topology.TopologyCluster cluster)
Returns the set of cluster devices.
|
Set<org.onosproject.net.Link> |
getClusterLinks(org.onosproject.net.topology.TopologyCluster cluster)
Returns the set of cluster links.
|
Set<org.onosproject.net.topology.TopologyCluster> |
getClusters()
Returns the set of topology clusters.
|
Set<org.onosproject.net.DisjointPath> |
getDisjointPaths(org.onosproject.net.DeviceId src,
org.onosproject.net.DeviceId dst)
/**
Returns the set of pre-computed shortest disjoint path pairs between source and
destination devices.
|
Set<org.onosproject.net.DisjointPath> |
getDisjointPaths(org.onosproject.net.DeviceId src,
org.onosproject.net.DeviceId dst,
org.onosproject.net.topology.LinkWeight weight)
Computes on-demand the set of shortest disjoint path pairs between source and
destination devices.
|
Set<org.onosproject.net.DisjointPath> |
getDisjointPaths(org.onosproject.net.DeviceId src,
org.onosproject.net.DeviceId dst,
org.onosproject.net.topology.LinkWeight weight,
Map<org.onosproject.net.Link,Object> riskProfile)
Computes on-demand the set of shortest disjoint risk groups path pairs between source and
destination devices.
|
Set<org.onosproject.net.DisjointPath> |
getDisjointPaths(org.onosproject.net.DeviceId src,
org.onosproject.net.DeviceId dst,
Map<org.onosproject.net.Link,Object> riskProfile)
Computes on-demand the set of shortest disjoint risk groups path pairs between source and
destination devices.
|
org.onosproject.net.topology.TopologyGraph |
getGraph()
Returns the backing topology graph.
|
Set<org.onosproject.net.Path> |
getPaths(org.onosproject.net.DeviceId src,
org.onosproject.net.DeviceId dst)
Returns the set of pre-computed shortest paths between source and
destination devices.
|
Set<org.onosproject.net.Path> |
getPaths(org.onosproject.net.DeviceId src,
org.onosproject.net.DeviceId dst,
org.onosproject.net.topology.LinkWeight weight)
Computes on-demand the set of shortest paths between source and
destination devices.
|
Set<org.onosproject.net.Path> |
getPaths(org.onosproject.net.DeviceId src,
org.onosproject.net.DeviceId dst,
org.onosproject.net.topology.LinkWeight weight,
int maxPaths)
Computes on-demand the set of shortest paths between source and
destination devices, the set of returned paths will be no more than,
maxPaths in size.
|
boolean |
isBroadcastPoint(org.onosproject.net.ConnectPoint connectPoint)
Indicates whether the given point is part of a broadcast set.
|
boolean |
isInfrastructure(org.onosproject.net.ConnectPoint connectPoint)
Indicates whether the given point is an infrastructure link end-point.
|
int |
linkCount() |
static void |
setDefaultGraphPathSearch(org.onlab.graph.GraphPathSearch<org.onosproject.net.topology.TopologyVertex,org.onosproject.net.topology.TopologyEdge> graphPathSearch)
Sets the default lpath search algorighm to be used when computing paths.
|
static void |
setDefaultLinkWeight(org.onosproject.net.topology.LinkWeight linkWeight)
Sets the default link-weight to be used when computing paths.
|
long |
time() |
String |
toString() |
public DefaultTopology(org.onosproject.net.provider.ProviderId providerId,
org.onosproject.net.topology.GraphDescription description,
com.google.common.base.Function<org.onosproject.net.ConnectPoint,Boolean> broadcastFunction)
providerId - identity of the providerdescription - data describing the new topologybroadcastFunction - broadcast point functionpublic DefaultTopology(org.onosproject.net.provider.ProviderId providerId,
org.onosproject.net.topology.GraphDescription description)
providerId - identity of the providerdescription - data describing the new topologypublic static void setDefaultLinkWeight(org.onosproject.net.topology.LinkWeight linkWeight)
linkWeight - new default link-weightpublic static void setDefaultGraphPathSearch(org.onlab.graph.GraphPathSearch<org.onosproject.net.topology.TopologyVertex,org.onosproject.net.topology.TopologyEdge> graphPathSearch)
graphPathSearch - new default algorithmpublic long time()
time in interface org.onosproject.net.topology.Topologypublic long creationTime()
creationTime in interface org.onosproject.net.topology.Topologypublic long computeCost()
computeCost in interface org.onosproject.net.topology.Topologypublic int clusterCount()
clusterCount in interface org.onosproject.net.topology.Topologypublic int deviceCount()
deviceCount in interface org.onosproject.net.topology.Topologypublic int linkCount()
linkCount in interface org.onosproject.net.topology.Topologypublic org.onosproject.net.topology.TopologyGraph getGraph()
public Set<org.onosproject.net.topology.TopologyCluster> getClusters()
public org.onosproject.net.topology.TopologyCluster getCluster(org.onosproject.net.topology.ClusterId clusterId)
clusterId - cluster identifierpublic org.onosproject.net.topology.TopologyCluster getCluster(org.onosproject.net.DeviceId deviceId)
deviceId - device identifierpublic Set<org.onosproject.net.DeviceId> getClusterDevices(org.onosproject.net.topology.TopologyCluster cluster)
cluster - topology clusterpublic Set<org.onosproject.net.Link> getClusterLinks(org.onosproject.net.topology.TopologyCluster cluster)
cluster - topology clusterpublic boolean isInfrastructure(org.onosproject.net.ConnectPoint connectPoint)
connectPoint - connection pointpublic boolean isBroadcastPoint(org.onosproject.net.ConnectPoint connectPoint)
connectPoint - connection pointpublic int broadcastSetSize(org.onosproject.net.topology.ClusterId clusterId)
clusterId - cluster identifierpublic Set<org.onosproject.net.ConnectPoint> broadcastPoints(org.onosproject.net.topology.ClusterId clusterId)
clusterId - cluster identifierpublic Set<org.onosproject.net.Path> getPaths(org.onosproject.net.DeviceId src, org.onosproject.net.DeviceId dst)
src - source devicedst - destination devicepublic Set<org.onosproject.net.Path> getPaths(org.onosproject.net.DeviceId src, org.onosproject.net.DeviceId dst, org.onosproject.net.topology.LinkWeight weight)
src - source devicedst - destination deviceweight - link weight functionpublic Set<org.onosproject.net.Path> getPaths(org.onosproject.net.DeviceId src, org.onosproject.net.DeviceId dst, org.onosproject.net.topology.LinkWeight weight, int maxPaths)
maxPaths paths will be returned
maintaining any ordering guarantees provided by the underlying
(default or if no default is specified DijkstraGraphSearch)
search. If returning all paths of a given length would exceed
maxPaths a subset of paths of that length will be returned,
which paths will be returned depends on the currently specified
GraphPathSearch. See setDefaultGraphPathSearch(org.onlab.graph.GraphPathSearch<org.onosproject.net.topology.TopologyVertex, org.onosproject.net.topology.TopologyEdge>).src - source devicedst - destination deviceweight - link weight functionmaxPaths - maximum number of pathspublic Set<org.onosproject.net.DisjointPath> getDisjointPaths(org.onosproject.net.DeviceId src, org.onosproject.net.DeviceId dst)
src - source devicedst - destination devicepublic Set<org.onosproject.net.DisjointPath> getDisjointPaths(org.onosproject.net.DeviceId src, org.onosproject.net.DeviceId dst, org.onosproject.net.topology.LinkWeight weight)
src - source devicedst - destination deviceweight - link weight functionpublic Set<org.onosproject.net.DisjointPath> getDisjointPaths(org.onosproject.net.DeviceId src, org.onosproject.net.DeviceId dst, org.onosproject.net.topology.LinkWeight weight, Map<org.onosproject.net.Link,Object> riskProfile)
src - source devicedst - destination deviceweight - edge weight objectriskProfile - map representing risk groups for each linkpublic Set<org.onosproject.net.DisjointPath> getDisjointPaths(org.onosproject.net.DeviceId src, org.onosproject.net.DeviceId dst, Map<org.onosproject.net.Link,Object> riskProfile)
src - source devicedst - destination deviceriskProfile - map representing risk groups for each link