Package org.opendaylight.graph
Interface ConnectedGraph
- All Known Implementing Classes:
ConnectedGraphImpl
public interface ConnectedGraph
Connected Graph class is the connected version of the Graph class from the graph yang model.
Connected Graph is composed by Connected Vertex, Connected Edges and Prefix. It models Unidirectional Connected Graph (see graph theory). So, Edge and Connected Edge are unidirectional, thus to connect bi-directionally 2 vertices Va and Vb, it is necessary to setup 2 edges: Va to Vb and Vb to Va.
-------------- --------------------------- --------------
| Connected |---->| Connected Edge Va to Vb |--->| Connected |
---->| Vertex | --------------------------- | Vertex |---->
| | | |
| - Key (Va) | | - Key (Vb) |
<----| - Vertex | --------------------------- | - Vertex |<----
| |<----| Connected Edge Vb to Va |<---| |
-------------- --------------------------- --------------
- Author:
- Olivier Dugeon, Philippe Niger
-
Method Summary
Modifier and TypeMethodDescriptionAdd Edge in the Connected Graph.void
Add Prefix in the Connected Graph.Add Vertex in the Connected Graph.void
clear()
Clear the Connected Graph by removing all Vertices, Edges and Prefixes.void
deleteEdge
(EdgeKey edgeKey) Remove the Edge in the Connected Graph.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
deleteVertex
(VertexKey vertexKey) Remove the Vertex in the Connected Graph.getConnectedEdge
(@NonNull Long key) 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.getConnectedVertex
(@NonNull Long key) 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.getEdges()
Returns the list of Connected Edges that form this graph.int
Returns the number of Edges in the graph.getGraph()
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 ippfx) 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.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.
-
Method Details
-
getGraph
Graph getGraph()Returns the Graph associated to this Connected Graph.- Returns:
- Graph
-
getVertices
List<ConnectedVertex> getVertices()Returns the list of Connected Vertices that form this graph.- Returns:
- list of Connected Vertices
-
getConnectedVertex
Returns the Vertex associated to the given key.- Parameters:
key
- Unique Vertex Identifier- Returns:
- Vertex or null if there is no Vertex associated to the given key in this graph
-
getConnectedVertex
ConnectedVertex 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.- 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
-
addVertex
Add Vertex in the Connected Graph. This action will automatically create the associated Connected Vertex and update the Graph in the DataStore.- Parameters:
vertex
- Vertex to be added- Returns:
- Connected Vertex associated to the given Vertex
-
deleteVertex
Remove the Vertex in the Connected Graph. This action will automatically remove the associated Connected Vertex and update the Graph in the DataStore.- Parameters:
vertexKey
- Unique Vertex Identifier
-
getVerticesSize
int getVerticesSize()Returns the number of Vertices in the graph.- Returns:
- number of vertices
-
getEdges
List<ConnectedEdge> getEdges()Returns the list of Connected Edges that form this graph.- Returns:
- list of Connected Edges
-
getConnectedEdge
Returns the Edge associated to the given key.- Parameters:
key
- Unique Edge Identifier- Returns:
- Edge or null if there is no Edge associated to the given key in this graph
-
getConnectedEdge
ConnectedEdge 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.- 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
ConnectedEdge 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.- 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
-
getConnectedEdge
ConnectedEdge 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.- 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
-
addEdge
Add Edge in the Connected Graph. This action will automatically create the associated Connected Edge and update the Graph in the DataStore.- Parameters:
edge
- Edge to be added- Returns:
- Connected Edge associated to the given Edge
-
deleteEdge
Remove the Edge in the Connected Graph. This action will automatically remove the associated Connected Edge and update the Graph in the DataStore.- Parameters:
edgeKey
- Unique Edge Identifier
-
getEdgesSize
int getEdgesSize()Returns the number of Edges in the graph.- Returns:
- number of edges
-
getPrefixes
Returns the list of Prefix that are stored in this graph.- Returns:
- list of Prefix
-
getPrefix
Prefix getPrefix(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix ippfx) Returns the Prefix associated to the given IP prefix.- Parameters:
ippfx
- IPv4 or IPv6 prefix- Returns:
- Prefix that match the given IPv4 or IPv6 prefix
-
addPrefix
Add Prefix in the Connected Graph. This action will automatically update the Graph in the DataStore.- Parameters:
prefix
- Prefix to be added
-
deletePrefix
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. This action will automatically update the Graph in the DataStore.- Parameters:
ippfx
- IPv4 or IPv6 prefix
-
clear
void clear()Clear the Connected Graph by removing all Vertices, Edges and Prefixes. This also remove the associated Graph in the Datastore. -
getSummary
String getSummary()Returns the summary of the graph characteristics: number of Vertices, Edges and Prefix.- Returns:
- characteristics of the Graph as a string
-
registerTrigger
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.- Parameters:
trigger
- Trigger to be registeredkey
- Topology Key Identifier- Returns:
- True if registration is done, false otherwise
-
unRegisterTrigger
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.- Parameters:
trigger
- Trigger to be unregisteredkey
- Topology Key Identifier- Returns:
- True if un-registration is done, false otherwise
-