Class ConnectedGraphImpl

java.lang.Object
org.opendaylight.graph.impl.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
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    addEdge(Edge edge)
    Add Edge in the Connected Graph.
    void
    addPrefix(Prefix prefix)
    Add Prefix in the Connected Graph.
    addVertex(Vertex vertex)
    Add Vertex in the Connected Graph.
    void
    Clear the Connected Graph by removing all Vertices, Edges and Prefixes.
    void
    Connected Edge is kept in the edges Hash Map in order to memorize the total Bandwidth reserved by Constrained Paths that belong to this Edge.
    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.
    void
    Remove the Vertex in the Connected Graph.
    Returns the Edge associated to the given key.
    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.
    getConnectedEdge(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address address)
    Returns the Edge associated to the given IPv4 address.
    getConnectedEdge(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address address)
    Returns the Edge associated to the given IPv6 address.
    Returns the Vertex associated to the given key.
    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.
    Returns the list of Connected Edges that form this graph.
    int
    Returns the number of Edges in the graph.
    Returns the Graph associated to this Connected Graph.
    getPrefix(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix prefix)
    Returns the Prefix associated to the given IP prefix.
    Returns the list of Prefix that are stored in this graph.
    Returns the summary of the graph characteristics: number of Vertices, Edges and Prefix.
    Returns the list of Connected Vertices that form this graph.
    int
    Returns the number of Vertices in the graph.
    boolean
    registerTrigger(ConnectedGraphTrigger trigger, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey key)
    Register a trigger that is executed when a problem occurs on a Vertex or a Edge within the Connected Graph.
    Returns the name of the associated Graph.
    boolean
    unRegisterTrigger(ConnectedGraphTrigger trigger, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey key)
    Un-register a trigger that is already registered on the Connected Graph.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • 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
    • getVertices

      public List<ConnectedVertex> getVertices()
      Description copied from interface: ConnectedGraph
      Returns the list of Connected Vertices that form this graph.
      Specified by:
      getVertices in interface ConnectedGraph
      Returns:
      list of Connected Vertices
    • getConnectedVertex

      public ConnectedVertex getConnectedVertex(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
    • getEdges

      public List<ConnectedEdge> getEdges()
      Description copied from interface: ConnectedGraph
      Returns the list of Connected Edges that form this graph.
      Specified by:
      getEdges in interface ConnectedGraph
      Returns:
      list of Connected Edges
    • getConnectedEdge

      public ConnectedEdge getConnectedEdge(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
    • getConnectedEdge

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

      public ConnectedEdge getConnectedEdge(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Address address)
      Description copied from interface: ConnectedGraph
      Returns the Edge associated to the given IPv6 address.
      Specified by:
      getConnectedEdge in interface ConnectedGraph
      Parameters:
      address - IPv6 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
    • getPrefixes

      public List<Prefix> getPrefixes()
      Description copied from interface: ConnectedGraph
      Returns the list of Prefix that are stored in this graph.
      Specified by:
      getPrefixes in interface ConnectedGraph
      Returns:
      list of Prefix
    • 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)
      Connected Edge is kept in the edges Hash Map in order to memorize the total Bandwidth reserved by Constrained Paths that belong to this Edge. Connected Edges are removed when the Connected Graph is cleared.
      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
    • registerTrigger

      public boolean registerTrigger(ConnectedGraphTrigger trigger, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey key)
      Description copied from interface: ConnectedGraph
      Register a trigger that is executed when a problem occurs on a Vertex or a Edge within the Connected Graph.
      Specified by:
      registerTrigger in interface ConnectedGraph
      Parameters:
      trigger - Trigger to be registered
      key - Topology Key Identifier
      Returns:
      True if registration is done, false otherwise
    • unRegisterTrigger

      public boolean unRegisterTrigger(ConnectedGraphTrigger trigger, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey key)
      Description copied from interface: ConnectedGraph
      Un-register a trigger that is already registered on the Connected Graph.
      Specified by:
      unRegisterTrigger in interface ConnectedGraph
      Parameters:
      trigger - Trigger to be unregistered
      key - Topology Key Identifier
      Returns:
      True if un-registration is done, false otherwise
    • toString

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