Class ConnectedVertexImpl

java.lang.Object
org.opendaylight.graph.impl.ConnectedVertexImpl
All Implemented Interfaces:
ConnectedVertex

public class ConnectedVertexImpl extends Object implements ConnectedVertex
This Class implements the Connected Vertex used by the Connected Graph for path computation algorithms.
Author:
Olivier Dugeon, Philippe Niger
  • Constructor Details

    • ConnectedVertexImpl

      public ConnectedVertexImpl(@NonNull Long key)
    • ConnectedVertexImpl

      public ConnectedVertexImpl(@NonNull Vertex vertex)
  • Method Details

    • setVertex

      public ConnectedVertexImpl setVertex(Vertex vertex)
      Set associated Vertex to this Connected Vertex.
      Parameters:
      vertex - Vertex
    • addInput

      public ConnectedVertexImpl addInput(ConnectedEdgeImpl edge)
      Add Connected Edge as input edge.
      Parameters:
      edge - Connected Edge
    • addOutput

      public ConnectedVertexImpl addOutput(ConnectedEdgeImpl edge)
      Add Connected Edge as output edge.
      Parameters:
      edge - Connected Edge
    • removeInput

      public ConnectedVertexImpl removeInput(ConnectedEdgeImpl edge)
      Remove input Connected Edge.
      Parameters:
      edge - Connected Edge
    • removeOutput

      public ConnectedVertexImpl removeOutput(ConnectedEdgeImpl edge)
      Remove output Connected Edge.
      Parameters:
      edge - Connected Edge
    • disconnect

      public void disconnect()
      Disconnect all input and output Connected Edge.
    • addPrefix

      public ConnectedVertexImpl addPrefix(Prefix prefix)
      Add Prefix to this Connected Vertex.
      Parameters:
      prefix - Prefix
    • removePrefix

      public void removePrefix(Prefix prefix)
      Remove Prefix.
      Parameters:
      prefix - Prefix
    • getKey

      public Long getKey()
      Description copied from interface: ConnectedVertex
      Returns unique key associated to this Connected Vertex.
      Specified by:
      getKey in interface ConnectedVertex
      Returns:
      Vertex Key
    • getVertex

      public Vertex getVertex()
      Description copied from interface: ConnectedVertex
      Returns Vertex associated to this Connected Vertex.
      Specified by:
      getVertex in interface ConnectedVertex
      Returns:
      vertex Vertex
    • getEdgeTo

      public List<ConnectedEdge> getEdgeTo(Long dstRid)
      Description copied from interface: ConnectedVertex
      Returns Connected Edges that has for destination the Connected Vertex identified by its key.
      Specified by:
      getEdgeTo in interface ConnectedVertex
      Parameters:
      dstRid - Unique Key that identify the destination Vertex
      Returns:
      List of Connected Edge
    • getInputEdges

      public List<Edge> getInputEdges()
      Description copied from interface: ConnectedVertex
      Returns the list of incoming Edge for this Connected Vertex.
      Specified by:
      getInputEdges in interface ConnectedVertex
      Returns:
      List of Edge
    • getInputConnectedEdges

      public List<ConnectedEdge> getInputConnectedEdges()
      Description copied from interface: ConnectedVertex
      Returns the list of incoming Connected Edge for this Connected Vertex.
      Specified by:
      getInputConnectedEdges in interface ConnectedVertex
      Returns:
      List of Connected Edge
    • getOutputEdges

      public List<Edge> getOutputEdges()
      Description copied from interface: ConnectedVertex
      Returns the list of outgoing Edge for this Connected Vertex.
      Specified by:
      getOutputEdges in interface ConnectedVertex
      Returns:
      List of Edge
    • getOutputConnectedEdges

      public List<ConnectedEdge> getOutputConnectedEdges()
      Description copied from interface: ConnectedVertex
      Returns the list of outgoing Connected Edge for this Connected Vertex.
      Specified by:
      getOutputConnectedEdges in interface ConnectedVertex
      Returns:
      List of Connected Edge
    • getPrefixes

      public List<Prefix> getPrefixes()
      Description copied from interface: ConnectedVertex
      Return the list of prefix announced by this Connected Vertex. Prefix contains the associated SID when Segment Routing is enable.
      Specified by:
      getPrefixes in interface ConnectedVertex
      Returns:
      List of Prefix
    • registerTrigger

      public boolean registerTrigger(ConnectedVertexTrigger trigger, String key)
      Description copied from interface: ConnectedVertex
      Register a trigger that is executed when a problem occurs on the Connected Vertex.
      Specified by:
      registerTrigger in interface ConnectedVertex
      Parameters:
      trigger - Trigger to be registered
      key - A unique key as string e.g. NodeId+LspId
      Returns:
      True if registration is done, false otherwise
    • unRegisterTrigger

      public boolean unRegisterTrigger(ConnectedVertexTrigger trigger, String key)
      Description copied from interface: ConnectedVertex
      Un-register a trigger that is already registered on the Connected Vertex.
      Specified by:
      unRegisterTrigger in interface ConnectedVertex
      Parameters:
      trigger - Trigger to be unregistered
      key - A unique key as string e.g. NodeId+LspId
      Returns:
      True if un-registration is done, false otherwise
    • getTriggers

      public List<ConnectedVertexTrigger> getTriggers()
    • toString

      public String toString()
      Return the name of the associated Vertex if set or the router-id otherwise.
      Overrides:
      toString in class Object
      Returns:
      Vertex name or router-id