Class ConnectedEdgeImpl

java.lang.Object
org.opendaylight.graph.impl.ConnectedEdgeImpl
All Implemented Interfaces:
ConnectedEdge

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

    • ConnectedEdgeImpl

      public ConnectedEdgeImpl(@NonNull Long key)
    • ConnectedEdgeImpl

      public ConnectedEdgeImpl(@NonNull Edge edge)
  • Method Details

    • setSource

      public ConnectedEdgeImpl setSource(ConnectedVertexImpl vertex)
      Set Connected Vertex as source.
      Parameters:
      vertex - Vertex
    • setDestination

      public ConnectedEdgeImpl setDestination(ConnectedVertexImpl vertex)
      Set Connected Vertex as destination.
      Parameters:
      vertex - Vertex
    • disconnectSource

      public void disconnectSource()
      Disconnect source Connected Vertex.
    • disconnectDestination

      public void disconnectDestination()
      Disconnect destination Connected Vertex.
    • disconnect

      public void disconnect()
      Disconnect both source and destination Connected Vertices.
    • setEdge

      public ConnectedEdgeImpl setEdge(Edge edge)
      Set associated Edge to this Connected Edge.
      Parameters:
      edge - Edge
    • getKey

      public @NonNull Long getKey()
      Description copied from interface: ConnectedEdge
      Returns unique key associated to this Connected Edge.
      Specified by:
      getKey in interface ConnectedEdge
      Returns:
      Edge Key
    • getSource

      public ConnectedVertex getSource()
      Description copied from interface: ConnectedEdge
      Returns the source Connected Vertex from the Connected Graph associated to this Connected Edge.
      Specified by:
      getSource in interface ConnectedEdge
      Returns:
      Source Connected Vertex
    • getDestination

      public ConnectedVertex getDestination()
      Description copied from interface: ConnectedEdge
      Returns the destination Connected Vertex from the Connected Graph associated to this Connected Edge.
      Specified by:
      getDestination in interface ConnectedEdge
      Returns:
      Destination Connected Vertex
    • getEdge

      public Edge getEdge()
      Description copied from interface: ConnectedEdge
      Returns the Edge from the Graph associated to this connection.
      Specified by:
      getEdge in interface ConnectedEdge
      Returns:
      Edge associated to this connection
    • getGlobalResvBandwidth

      public Long getGlobalResvBandwidth()
      Description copied from interface: ConnectedEdge
      Returns the total amount of Bandwidth consumes by all Constrained Paths that belong to the Edge associated to this Connected Edge for all Class of Service.
      Specified by:
      getGlobalResvBandwidth in interface ConnectedEdge
      Returns:
      Global Reserved Bandwidth
    • getCosResvBandwidth

      public Long getCosResvBandwidth(int cos)
      Description copied from interface: ConnectedEdge
      Returns the total amount of Bandwidth consumes by all Constrained Paths that belong to the Edge associated to this Connected Edge for the given Class of Service (CoS).
      Specified by:
      getCosResvBandwidth in interface ConnectedEdge
      Parameters:
      cos - Class of Service
      Returns:
      Reserved Bandwidth per CoS
    • addBandwidth

      public void addBandwidth(Long bw, int cos)
      Description copied from interface: ConnectedEdge
      Add the given Bandwidth for the given Class of Service (CoS) to the associated Edge of this Connected Edge. This method increments by the Bandwidth value the GlobalResvBandwidth and the ReservedBandwidth[cos] attributes.
      Specified by:
      addBandwidth in interface ConnectedEdge
      Parameters:
      bw - Bandwidth consumed by the TE Path
      cos - Class of Service of the TE Path
    • delBandwidth

      public void delBandwidth(Long bw, int cos)
      Description copied from interface: ConnectedEdge
      Remove the given Bandwidth for the given Class of Service (CoS) to the associated Edge of this Connected Edge. This method decrements by the Bandwidth value the GlobalResvBandwidth and the ReservedBandwidth[cos] attributes.
      Specified by:
      delBandwidth in interface ConnectedEdge
      Parameters:
      bw - Bandwidth consumed by the TE Path
      cos - Class of Service of the TE Path
    • registerTrigger

      public boolean registerTrigger(ConnectedEdgeTrigger trigger, String key)
      Description copied from interface: ConnectedEdge
      Register a trigger that is executed when a problem occurs on the Connected Edge.
      Specified by:
      registerTrigger in interface ConnectedEdge
      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(ConnectedEdgeTrigger trigger, String key)
      Description copied from interface: ConnectedEdge
      Un-register a trigger that is already registered on the Connected Edge.
      Specified by:
      unRegisterTrigger in interface ConnectedEdge
      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<ConnectedEdgeTrigger> getTriggers()
    • toString

      public String toString()
      Returns the name of the associated Edge if set or the interface address otherwise.
      Overrides:
      toString in class Object
      Returns:
      Edge name or interface address