Interface TopologyService

    • Method Detail

      • currentTopology

        Topology currentTopology()
        Returns the current topology descriptor.
        Returns:
        current topology
      • isLatest

        boolean isLatest​(Topology topology)
        Indicates whether the specified topology is the latest or not.
        Parameters:
        topology - topology descriptor
        Returns:
        true if the topology is the most recent; false otherwise
      • getGraph

        TopologyGraph getGraph​(Topology topology)
        Returns the graph view of the specified topology.
        Parameters:
        topology - topology descriptor
        Returns:
        topology graph view
      • getClusters

        Set<TopologyCluster> getClusters​(Topology topology)
        Returns the set of clusters in the specified topology.
        Parameters:
        topology - topology descriptor
        Returns:
        set of topology clusters
      • getCluster

        TopologyCluster getCluster​(Topology topology,
                                   ClusterId clusterId)
        Returns the cluster with the specified ID.
        Parameters:
        topology - topology descriptor
        clusterId - cluster identifier
        Returns:
        topology cluster
      • getClusterDevices

        Set<DeviceId> getClusterDevices​(Topology topology,
                                        TopologyCluster cluster)
        Returns the set of devices that belong to the specified cluster.
        Parameters:
        topology - topology descriptor
        cluster - topology cluster
        Returns:
        set of cluster devices
      • getClusterLinks

        Set<Link> getClusterLinks​(Topology topology,
                                  TopologyCluster cluster)
        Returns the set of links that form the specified cluster.
        Parameters:
        topology - topology descriptor
        cluster - topology cluster
        Returns:
        set of cluster links
      • getPaths

        Set<Path> getPaths​(Topology topology,
                           DeviceId src,
                           DeviceId dst)
        Returns the set of all shortest paths, precomputed in terms of hop-count, between the specified source and destination devices.
        Parameters:
        topology - topology descriptor
        src - source device
        dst - destination device
        Returns:
        set of all shortest paths between the two devices
      • getPaths

        Set<Path> getPaths​(Topology topology,
                           DeviceId src,
                           DeviceId dst,
                           LinkWeigher weigher)
        Returns the set of all shortest paths, computed using the supplied edge-weight entity, between the specified source and destination devices.
        Parameters:
        topology - topology descriptor
        src - source device
        dst - destination device
        weigher - edge-weight entity
        Returns:
        set of all shortest paths between the two devices
      • getKShortestPaths

        default Set<Path> getKShortestPaths​(Topology topology,
                                            DeviceId src,
                                            DeviceId dst,
                                            LinkWeigher weigher,
                                            int maxPaths)
        Returns the k-shortest paths between source and destination devices. The first maxPaths paths will be returned in ascending order according to the provided weigher
        Parameters:
        topology - topology descriptor
        src - source device
        dst - destination device
        weigher - edge-weight entity
        maxPaths - maximum number of paths (k)
        Returns:
        set of k-shortest paths
      • getKShortestPaths

        default Stream<Path> getKShortestPaths​(Topology topology,
                                               DeviceId src,
                                               DeviceId dst)
        Returns the k-shortest paths between source and destination devices.
        Parameters:
        topology - topology descriptor
        src - source device
        dst - destination device
        Returns:
        stream of k-shortest paths
      • getKShortestPaths

        default Stream<Path> getKShortestPaths​(Topology topology,
                                               DeviceId src,
                                               DeviceId dst,
                                               LinkWeigher weigher)
        Returns the k-shortest paths between source and destination devices.
        Parameters:
        topology - topology descriptor
        src - source device
        dst - destination device
        weigher - edge-weight entity
        Returns:
        stream of k-shortest paths
      • getDisjointPaths

        Set<DisjointPath> getDisjointPaths​(Topology topology,
                                           DeviceId src,
                                           DeviceId dst)
        Returns the set of all disjoint shortest path pairs, precomputed in terms of hop-count, between the specified source and destination devices.
        Parameters:
        topology - topology descriptor
        src - source device
        dst - destination device
        Returns:
        set of all shortest paths between the two devices
      • getDisjointPaths

        Set<DisjointPath> getDisjointPaths​(Topology topology,
                                           DeviceId src,
                                           DeviceId dst,
                                           LinkWeigher weigher)
        Returns the set of all disjoint shortest path pairs, computed using the supplied edge-weight entity, between the specified source and destination devices.
        Parameters:
        topology - topology descriptor
        src - source device
        dst - destination device
        weigher - edge-weight entity
        Returns:
        set of all shortest paths between the two devices
      • getDisjointPaths

        Set<DisjointPath> getDisjointPaths​(Topology topology,
                                           DeviceId src,
                                           DeviceId dst,
                                           Map<Link,​Object> riskProfile)
        Returns the set of all disjoint shortest path pairs, precomputed in terms of hop-count, between the specified source and destination devices.
        Parameters:
        topology - topology descriptor
        src - source device
        dst - destination device
        riskProfile - map of edges to risk profiles
        Returns:
        set of all shortest paths between the two devices
      • getDisjointPaths

        Set<DisjointPath> getDisjointPaths​(Topology topology,
                                           DeviceId src,
                                           DeviceId dst,
                                           LinkWeigher weigher,
                                           Map<Link,​Object> riskProfile)
        Returns the set of all disjoint shortest path pairs, precomputed in terms of hop-count, between the specified source and destination devices.
        Parameters:
        topology - topology descriptor
        src - source device
        dst - destination device
        weigher - edge-weight entity
        riskProfile - map of edges to risk profiles
        Returns:
        set of all shortest paths between the two devices
      • isInfrastructure

        boolean isInfrastructure​(Topology topology,
                                 ConnectPoint connectPoint)
        Indicates whether the specified connection point is part of the network infrastructure or part of network edge.
        Parameters:
        topology - topology descriptor
        connectPoint - connection point
        Returns:
        true of connection point is in infrastructure; false if edge
      • isBroadcastPoint

        boolean isBroadcastPoint​(Topology topology,
                                 ConnectPoint connectPoint)
        Indicates whether broadcast is allowed for traffic received on the specified connection point.
        Parameters:
        topology - topology descriptor
        connectPoint - connection point
        Returns:
        true if broadcast is permissible