Package org.opendaylight.graph.impl
Class ConnectedEdgeImpl
java.lang.Object
org.opendaylight.graph.impl.ConnectedEdgeImpl
- All Implemented Interfaces:
ConnectedEdge
This Class implements the Connected Edge used by the Connected Graph for path computation algorithms.
- Author:
- Olivier Dugeon, Philippe Niger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBandwidth(Long bw, int cos) Add the given Bandwidth for the given Class of Service (CoS) to the associated Edge of this Connected Edge.voiddelBandwidth(Long bw, int cos) Remove the given Bandwidth for the given Class of Service (CoS) to the associated Edge of this Connected Edge.voidDisconnect both source and destination Connected Vertices.voidDisconnect destination Connected Vertex.voidDisconnect source Connected Vertex.getCosResvBandwidth(int cos) 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).Returns the destination Connected Vertex from the Connected Graph associated to this Connected Edge.getEdge()Returns the Edge from the Graph associated to this connection.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.@NonNull LonggetKey()Returns unique key associated to this Connected Edge.Returns the source Connected Vertex from the Connected Graph associated to this Connected Edge.booleanregisterTrigger(ConnectedEdgeTrigger trigger, String key) Register a trigger that is executed when a problem occurs on the Connected Edge.setDestination(ConnectedVertexImpl vertex) Set Connected Vertex as destination.Set associated Edge to this Connected Edge.setSource(ConnectedVertexImpl vertex) Set Connected Vertex as source.toString()Returns the name of the associated Edge if set or the interface address otherwise.booleanunRegisterTrigger(ConnectedEdgeTrigger trigger, String key) Un-register a trigger that is already registered on the Connected Edge.
-
Constructor Details
-
ConnectedEdgeImpl
-
ConnectedEdgeImpl
-
-
Method Details
-
setSource
Set Connected Vertex as source.- Parameters:
vertex- Vertex
-
setDestination
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
Set associated Edge to this Connected Edge.- Parameters:
edge- Edge
-
getKey
Description copied from interface:ConnectedEdgeReturns unique key associated to this Connected Edge.- Specified by:
getKeyin interfaceConnectedEdge- Returns:
- Edge Key
-
getSource
Description copied from interface:ConnectedEdgeReturns the source Connected Vertex from the Connected Graph associated to this Connected Edge.- Specified by:
getSourcein interfaceConnectedEdge- Returns:
- Source Connected Vertex
-
getDestination
Description copied from interface:ConnectedEdgeReturns the destination Connected Vertex from the Connected Graph associated to this Connected Edge.- Specified by:
getDestinationin interfaceConnectedEdge- Returns:
- Destination Connected Vertex
-
getEdge
Description copied from interface:ConnectedEdgeReturns the Edge from the Graph associated to this connection.- Specified by:
getEdgein interfaceConnectedEdge- Returns:
- Edge associated to this connection
-
getGlobalResvBandwidth
Description copied from interface:ConnectedEdgeReturns 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:
getGlobalResvBandwidthin interfaceConnectedEdge- Returns:
- Global Reserved Bandwidth
-
getCosResvBandwidth
Description copied from interface:ConnectedEdgeReturns 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:
getCosResvBandwidthin interfaceConnectedEdge- Parameters:
cos- Class of Service- Returns:
- Reserved Bandwidth per CoS
-
addBandwidth
Description copied from interface:ConnectedEdgeAdd 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:
addBandwidthin interfaceConnectedEdge- Parameters:
bw- Bandwidth consumed by the TE Pathcos- Class of Service of the TE Path
-
delBandwidth
Description copied from interface:ConnectedEdgeRemove 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:
delBandwidthin interfaceConnectedEdge- Parameters:
bw- Bandwidth consumed by the TE Pathcos- Class of Service of the TE Path
-
registerTrigger
Description copied from interface:ConnectedEdgeRegister a trigger that is executed when a problem occurs on the Connected Edge.- Specified by:
registerTriggerin interfaceConnectedEdge- Parameters:
trigger- Trigger to be registeredkey- A unique key as string e.g. NodeId+LspId- Returns:
- True if registration is done, false otherwise
-
unRegisterTrigger
Description copied from interface:ConnectedEdgeUn-register a trigger that is already registered on the Connected Edge.- Specified by:
unRegisterTriggerin interfaceConnectedEdge- Parameters:
trigger- Trigger to be unregisteredkey- A unique key as string e.g. NodeId+LspId- Returns:
- True if un-registration is done, false otherwise
-
getTriggers
-
toString
Returns the name of the associated Edge if set or the interface address otherwise.
-