Class ConnectedGraphImpl

  • All Implemented Interfaces:
    ConnectedGraph

    public class ConnectedGraphImpl
    extends Object
    implements ConnectedGraph
    This Class implements the Connected Graph for path computation algorithms.
    Author:
    Olivier Dugeon, Philippe Niger
    • Method Detail

      • getGraph

        public Graph getGraph()
        Description copied from interface: ConnectedGraph
        Returns the Graph associated to this Connected Graph.
        Specified by:
        getGraph in interface ConnectedGraph
        Returns:
        Graph
      • getConnectedVertex

        public ConnectedVertex getConnectedVertex​(@NonNull Long key)
        Description copied from interface: ConnectedGraph
        Returns the Vertex associated to the given key.
        Specified by:
        getConnectedVertex in interface ConnectedGraph
        Parameters:
        key - Unique Vertex Identifier
        Returns:
        Vertex or null if there is no Vertex associated to the given key in this graph
      • getConnectedVertex

        public ConnectedVertex getConnectedVertex​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress address)
        Description copied from interface: ConnectedGraph
        Returns the Vertex associated to the given IP address.
        Specified by:
        getConnectedVertex in interface ConnectedGraph
        Parameters:
        address - IP address of the Loopback of the Vertex
        Returns:
        Vertex or null if there is no Vertex associated to the given IP address in this graph
      • getVerticesSize

        public int getVerticesSize()
        Description copied from interface: ConnectedGraph
        Returns the number of Vertices in the graph.
        Specified by:
        getVerticesSize in interface ConnectedGraph
        Returns:
        number of vertices
      • getConnectedEdge

        public ConnectedEdge getConnectedEdge​(@NonNull Long key)
        Description copied from interface: ConnectedGraph
        Returns the Edge associated to the given key.
        Specified by:
        getConnectedEdge in interface ConnectedGraph
        Parameters:
        key - Unique Edge Identifier
        Returns:
        Edge or null if there is no Edge associated to the given key in this graph
      • getConnectedEdge

        public ConnectedEdge getConnectedEdge​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress address)
        Description copied from interface: ConnectedGraph
        Returns the Edge associated to the given IP address.
        Specified by:
        getConnectedEdge in interface ConnectedGraph
        Parameters:
        address - IP address of the Edge
        Returns:
        Edge or null if there is no Edge associated to the given IP address in this graph
      • getEdgesSize

        public int getEdgesSize()
        Description copied from interface: ConnectedGraph
        Returns the number of Edges in the graph.
        Specified by:
        getEdgesSize in interface ConnectedGraph
        Returns:
        number of edges
      • getPrefix

        public Prefix getPrefix​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix prefix)
        Description copied from interface: ConnectedGraph
        Returns the Prefix associated to the given IP prefix.
        Specified by:
        getPrefix in interface ConnectedGraph
        Parameters:
        prefix - IPv4 or IPv6 prefix
        Returns:
        Prefix that match the given IPv4 or IPv6 prefix
      • addVertex

        public ConnectedVertex addVertex​(Vertex vertex)
        Description copied from interface: ConnectedGraph
        Add Vertex in the Connected Graph. This action will automatically create the associated Connected Vertex and update the Graph in the DataStore.
        Specified by:
        addVertex in interface ConnectedGraph
        Parameters:
        vertex - Vertex to be added
        Returns:
        Connected Vertex associated to the given Vertex
      • deleteVertex

        public void deleteVertex​(VertexKey key)
        Description copied from interface: ConnectedGraph
        Remove the Vertex in the Connected Graph. This action will automatically remove the associated Connected Vertex and update the Graph in the DataStore.
        Specified by:
        deleteVertex in interface ConnectedGraph
        Parameters:
        key - Unique Vertex Identifier
      • addEdge

        public ConnectedEdge addEdge​(Edge edge)
        Description copied from interface: ConnectedGraph
        Add Edge in the Connected Graph. This action will automatically create the associated Connected Edge and update the Graph in the DataStore.
        Specified by:
        addEdge in interface ConnectedGraph
        Parameters:
        edge - Edge to be added
        Returns:
        Connected Edge associated to the given Edge
      • deleteEdge

        public void deleteEdge​(EdgeKey key)
        Description copied from interface: ConnectedGraph
        Remove the Edge in the Connected Graph. This action will automatically remove the associated Connected Edge and update the Graph in the DataStore.
        Specified by:
        deleteEdge in interface ConnectedGraph
        Parameters:
        key - Unique Edge Identifier
      • addPrefix

        public void addPrefix​(Prefix prefix)
        Description copied from interface: ConnectedGraph
        Add Prefix in the Connected Graph. This action will automatically update the Graph in the DataStore.
        Specified by:
        addPrefix in interface ConnectedGraph
        Parameters:
        prefix - Prefix to be added
      • deletePrefix

        public void deletePrefix​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix ippfx)
        Description copied from interface: ConnectedGraph
        Remove the Prefix in the Connected Graph. This action will automatically update the Graph in the DataStore.
        Specified by:
        deletePrefix in interface ConnectedGraph
        Parameters:
        ippfx - IPv4 or IPv6 prefix
      • clear

        public void clear()
        Description copied from interface: ConnectedGraph
        Clear the Connected Graph by removing all Vertices, Edges and Prefixes. This also remove the associated Graph in the Datastore.
        Specified by:
        clear in interface ConnectedGraph
      • getSummary

        public String getSummary()
        Description copied from interface: ConnectedGraph
        Returns the summary of the graph characteristics: number of Vertices, Edges and Prefix.
        Specified by:
        getSummary in interface ConnectedGraph
        Returns:
        characteristics of the Graph as a string
      • toString

        public String toString()
        Returns the name of the associated Graph.
        Overrides:
        toString in class Object
        Returns:
        Graph name