Interface TopologyStore

    • 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 descriptor
        clusterId - cluster identity
        Returns:
        topology cluster
      • getClusterDevices

        Set<DeviceId> getClusterDevices​(Topology topology,
                                        TopologyCluster cluster)
        Returns the cluster of the specified topology.
        Parameters:
        topology - topology descriptor
        cluster - 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 descriptor
        cluster - 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 descriptor
        src - source device
        dst - 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 descriptor
        src - source device
        dst - destination device
        weigher - 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 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,
                                               LinkWeigher weigher)
        Computes and 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,
                                           LinkWeigher weigher)
        Computes and returns the set of disjoint shortest path pairs between src and dst.
        Parameters:
        topology - topology descriptor
        src - source device
        dst - destination device
        weigher - 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 descriptor
        src - source device
        dst - 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 descriptor
        src - source device
        dst - destination device
        weigher - link weight function
        riskProfile - 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 descriptor
        src - source device
        dst - destination device
        riskProfile - 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 descriptor
        connectPoint - 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 descriptor
        connectPoint - 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 identification
        graphDescription - topology graph description
        reasons - list of events that triggered the update
        Returns:
        topology update event or null if the description is old