Interface ConnectedGraph

  • All Known Implementing Classes:
    ConnectedGraphImpl

    public interface ConnectedGraph
    Connected Graph class is the connected version of the Graph class from the graph yang model.

    Connected Graph is composed by Connected Vertex, Connected Edges and Prefix. It models Unidirectional Connected Graph (see graph theory). So, Edge and Connected Edge are unidirectional, thus to connect bi-directionally 2 vertices Va and Vb, it is necessary to setup 2 edges: Va to Vb and Vb to Va.

     
            --------------     ---------------------------    --------------
            | Connected  |---->| Connected Edge Va to Vb |--->| Connected  |
       ---->|  Vertex    |     ---------------------------    |  Vertex    |---->
            |            |                                    |            |
            | - Key (Va) |                                    | - Key (Vb) |
       <----| - Vertex   |     ---------------------------    | - Vertex   |<----
            |            |<----| Connected Edge Vb to Va |<---|            |
            --------------     ---------------------------    --------------
     
     
    Author:
    Olivier Dugeon, Philippe Niger
    • Method Detail

      • getGraph

        Graph getGraph()
        Returns the Graph associated to this Connected Graph.
        Returns:
        Graph
      • getVertices

        List<ConnectedVertex> getVertices()
        Returns the list of Connected Vertices that form this graph.
        Returns:
        list of Connected Vertices
      • getConnectedVertex

        ConnectedVertex getConnectedVertex​(Long key)
        Returns the Vertex associated to the given key.
        Parameters:
        key - Unique Vertex Identifier
        Returns:
        Vertex or null if there is no Vertex associated to the given key in this graph
      • getConnectedVertex

        ConnectedVertex getConnectedVertex​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress address)
        Returns the Vertex associated to the given IP address.
        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
      • addVertex

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

        void deleteVertex​(VertexKey vertexKey)
        Remove the Vertex in the Connected Graph. This action will automatically remove the associated Connected Vertex and update the Graph in the DataStore.
        Parameters:
        vertexKey - Unique Vertex Identifier
      • getVerticesSize

        int getVerticesSize()
        Returns the number of Vertices in the graph.
        Returns:
        number of vertices
      • getEdges

        List<ConnectedEdge> getEdges()
        Returns the list of Connected Edges that form this graph.
        Returns:
        list of Connected Edges
      • getConnectedEdge

        ConnectedEdge getConnectedEdge​(Long key)
        Returns the Edge associated to the given key.
        Parameters:
        key - Unique Edge Identifier
        Returns:
        Edge or null if there is no Edge associated to the given key in this graph
      • getConnectedEdge

        ConnectedEdge getConnectedEdge​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress address)
        Returns the Edge associated to the given IP address.
        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
      • addEdge

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

        void deleteEdge​(EdgeKey edgeKey)
        Remove the Edge in the Connected Graph. This action will automatically remove the associated Connected Edge and update the Graph in the DataStore.
        Parameters:
        edgeKey - Unique Edge Identifier
      • getEdgesSize

        int getEdgesSize()
        Returns the number of Edges in the graph.
        Returns:
        number of edges
      • getPrefixes

        List<Prefix> getPrefixes()
        Returns the list of Prefix that are stored in this graph.
        Returns:
        list of Prefix
      • getPrefix

        Prefix getPrefix​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix ippfx)
        Returns the Prefix associated to the given IP prefix.
        Parameters:
        ippfx - IPv4 or IPv6 prefix
        Returns:
        Prefix that match the given IPv4 or IPv6 prefix
      • addPrefix

        void addPrefix​(Prefix prefix)
        Add Prefix in the Connected Graph. This action will automatically update the Graph in the DataStore.
        Parameters:
        prefix - Prefix to be added
      • deletePrefix

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

        void clear()
        Clear the Connected Graph by removing all Vertices, Edges and Prefixes. This also remove the associated Graph in the Datastore.
      • getSummary

        String getSummary()
        Returns the summary of the graph characteristics: number of Vertices, Edges and Prefix.
        Returns:
        characteristics of the Graph as a string