Package org.opendaylight.graph.impl
Class ConnectedVertexImpl
java.lang.Object
org.opendaylight.graph.impl.ConnectedVertexImpl
- All Implemented Interfaces:
ConnectedVertex
This Class implements the Connected Vertex used by the Connected Graph for path computation algorithms.
- Author:
- Olivier Dugeon, Philippe Niger
-
Constructor Summary
ConstructorsConstructorDescriptionConnectedVertexImpl(@NonNull Long key) ConnectedVertexImpl(@NonNull Vertex vertex) -
Method Summary
Modifier and TypeMethodDescriptionaddInput(ConnectedEdgeImpl edge) Add Connected Edge as input edge.addOutput(ConnectedEdgeImpl edge) Add Connected Edge as output edge.Add Prefix to this Connected Vertex.voidDisconnect all input and output Connected Edge.Returns Connected Edges that has for destination the Connected Vertex identified by its key.Returns the list of incoming Connected Edge for this Connected Vertex.Returns the list of incoming Edge for this Connected Vertex.getKey()Returns unique key associated to this Connected Vertex.Returns the list of outgoing Connected Edge for this Connected Vertex.Returns the list of outgoing Edge for this Connected Vertex.Return the list of prefix announced by this Connected Vertex.Returns Vertex associated to this Connected Vertex.booleanisDivert()Get status of Vertex when computing Path Diversity.booleanregisterTrigger(ConnectedVertexTrigger trigger, String key) Register a trigger that is executed when a problem occurs on the Connected Vertex.removeInput(ConnectedEdgeImpl edge) Remove input Connected Edge.Remove output Connected Edge.voidremovePrefix(Prefix prefix) Remove Prefix.voidsetDiversity(boolean used) Set status of Vertex when computing Path Diversity.Set associated Vertex to this Connected Vertex.toString()Return the name of the associated Vertex if set or the router-id otherwise.booleanunRegisterTrigger(ConnectedVertexTrigger trigger, String key) Un-register a trigger that is already registered on the Connected Vertex.
-
Constructor Details
-
ConnectedVertexImpl
-
ConnectedVertexImpl
-
-
Method Details
-
setVertex
Set associated Vertex to this Connected Vertex.- Parameters:
vertex- Vertex- Returns:
- This Connected Vertex
-
addInput
Add Connected Edge as input edge.- Parameters:
edge- Connected Edge- Returns:
- This Connected Vertex
-
addOutput
Add Connected Edge as output edge.- Parameters:
edge- Connected Edge- Returns:
- This Connected Vertex
-
removeInput
Remove input Connected Edge.- Parameters:
edge- Connected Edge- Returns:
- This Connected Vertex
-
removeOutput
Remove output Connected Edge.- Parameters:
edge- Connected Edge- Returns:
- This Connected Vertex
-
disconnect
public void disconnect()Disconnect all input and output Connected Edge. -
addPrefix
Add Prefix to this Connected Vertex.- Parameters:
prefix- Prefix- Returns:
- This Connected Vertex
-
removePrefix
Remove Prefix.- Parameters:
prefix- Prefix
-
getKey
Description copied from interface:ConnectedVertexReturns unique key associated to this Connected Vertex.- Specified by:
getKeyin interfaceConnectedVertex- Returns:
- Vertex Key
-
getVertex
Description copied from interface:ConnectedVertexReturns Vertex associated to this Connected Vertex.- Specified by:
getVertexin interfaceConnectedVertex- Returns:
- vertex Vertex
-
getEdgeTo
Description copied from interface:ConnectedVertexReturns Connected Edges that has for destination the Connected Vertex identified by its key.- Specified by:
getEdgeToin interfaceConnectedVertex- Parameters:
dstRid- Unique Key that identify the destination Vertex- Returns:
- List of Connected Edge
-
getInputEdges
Description copied from interface:ConnectedVertexReturns the list of incoming Edge for this Connected Vertex.- Specified by:
getInputEdgesin interfaceConnectedVertex- Returns:
- List of Edge
-
getInputConnectedEdges
Description copied from interface:ConnectedVertexReturns the list of incoming Connected Edge for this Connected Vertex.- Specified by:
getInputConnectedEdgesin interfaceConnectedVertex- Returns:
- List of Connected Edge
-
getOutputEdges
Description copied from interface:ConnectedVertexReturns the list of outgoing Edge for this Connected Vertex.- Specified by:
getOutputEdgesin interfaceConnectedVertex- Returns:
- List of Edge
-
getOutputConnectedEdges
Description copied from interface:ConnectedVertexReturns the list of outgoing Connected Edge for this Connected Vertex.- Specified by:
getOutputConnectedEdgesin interfaceConnectedVertex- Returns:
- List of Connected Edge
-
getPrefixes
Description copied from interface:ConnectedVertexReturn the list of prefix announced by this Connected Vertex. Prefix contains the associated SID when Segment Routing is enable.- Specified by:
getPrefixesin interfaceConnectedVertex- Returns:
- List of Prefix
-
registerTrigger
Description copied from interface:ConnectedVertexRegister a trigger that is executed when a problem occurs on the Connected Vertex.- Specified by:
registerTriggerin interfaceConnectedVertex- 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:ConnectedVertexUn-register a trigger that is already registered on the Connected Vertex.- Specified by:
unRegisterTriggerin interfaceConnectedVertex- 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
-
isDivert
public boolean isDivert()Description copied from interface:ConnectedVertexGet status of Vertex when computing Path Diversity.- Specified by:
isDivertin interfaceConnectedVertex- Returns:
- True if Vertex is already used by the Primary path, false otherwise.
-
setDiversity
public void setDiversity(boolean used) Description copied from interface:ConnectedVertexSet status of Vertex when computing Path Diversity.- Specified by:
setDiversityin interfaceConnectedVertex- Parameters:
used- True to indicate that the Vertex is used by the Primary Path. False to mark it unused.
-
toString
Return the name of the associated Vertex if set or the router-id otherwise.
-