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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ConnectedEdge
addEdge(Edge edge)
Add Edge in the Connected Graph.void
addPrefix(Prefix prefix)
Add Prefix in the Connected Graph.ConnectedVertex
addVertex(Vertex vertex)
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.ConnectedEdge
getConnectedEdge(@NonNull Long key)
Returns the Edge associated to the given key.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.ConnectedVertex
getConnectedVertex(@NonNull Long key)
Returns the Vertex associated to the given key.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.List<ConnectedEdge>
getEdges()
Returns the list of Connected Edges that form this graph.int
getEdgesSize()
Returns the number of Edges in the graph.Graph
getGraph()
Returns the Graph associated to this Connected Graph.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.List<Prefix>
getPrefixes()
Returns the list of Prefix that are stored in this graph.String
getSummary()
Returns the summary of the graph characteristics: number of Vertices, Edges and Prefix.List<ConnectedVertex>
getVertices()
Returns the list of Connected Vertices that form this graph.int
getVerticesSize()
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 Detail
-
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
ConnectedVertex getConnectedVertex(@NonNull Long key)
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
ConnectedVertex addVertex(Vertex vertex)
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
void deleteVertex(VertexKey vertexKey)
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
ConnectedEdge getConnectedEdge(@NonNull Long key)
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.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
ConnectedEdge addEdge(Edge edge)
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
void deleteEdge(EdgeKey edgeKey)
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
List<Prefix> 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
void addPrefix(Prefix prefix)
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
-
-