Class ServiceDependencyGraph
java.lang.Object
org.jgrapht.graph.AbstractGraph<V,E>
org.jgrapht.graph.AbstractBaseGraph<V,E>
org.jgrapht.graph.DirectedMultigraph<V,E>
org.jgrapht.graph.DirectedWeightedMultigraph<Microservice,RestCallEdge>
edu.university.ecs.lab.common.models.sdg.ServiceDependencyGraph
- All Implemented Interfaces:
DependencyGraphI<Microservice,,RestCallEdge> JsonSerializable,Serializable,Cloneable,org.jgrapht.Graph<Microservice,RestCallEdge>
public class ServiceDependencyGraph
extends org.jgrapht.graph.DirectedWeightedMultigraph<Microservice,RestCallEdge>
implements JsonSerializable, DependencyGraphI<Microservice,RestCallEdge>
Represents a service dependency graph for a microservice system.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass to serialize a microservice as a json objectclassClass to serialize a rest call as a json object -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanWhether the edges are interpreted as directedprivate final StringRepresents the name of the graphprivate final booleanWhether several edges between source and target are allowedprivate final StringThe timestamp of the current Network graph (i.e.Fields inherited from interface org.jgrapht.Graph
DEFAULT_EDGE_WEIGHT -
Constructor Summary
ConstructorsConstructorDescriptionServiceDependencyGraph(MicroserviceSystem microserviceSystem) Creates the network graph from a given MicroserviceSystem. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gson.JsonObjectMethods inherited from class org.jgrapht.graph.DirectedWeightedMultigraph
createBuilder, createBuilderMethods inherited from class org.jgrapht.graph.AbstractBaseGraph
addEdge, addEdge, addVertex, addVertex, clone, containsEdge, containsVertex, degreeOf, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeSource, getEdgeSupplier, getEdgeTarget, getEdgeWeight, getType, getVertexSupplier, incomingEdgesOf, inDegreeOf, iterables, outDegreeOf, outgoingEdgesOf, removeEdge, removeEdge, removeVertex, setEdgeSupplier, setEdgeWeight, setVertexSupplier, vertexSetMethods inherited from class org.jgrapht.graph.AbstractGraph
assertVertexExist, containsEdge, equals, hashCode, removeAllEdges, removeAllEdges, removeAllEdges, removeAllVertices, toString, toStringFromSetsMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface edu.university.ecs.lab.common.models.sdg.DependencyGraphI
getAdjacency, getAdjacency, getLabel, getTimestamp, isDirected, isMultigraphMethods inherited from interface org.jgrapht.Graph
addEdge, addEdge, addVertex, addVertex, containsEdge, containsEdge, containsVertex, degreeOf, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeSource, getEdgeSupplier, getEdgeTarget, getEdgeWeight, getType, getVertexSupplier, incomingEdgesOf, inDegreeOf, iterables, outDegreeOf, outgoingEdgesOf, removeAllEdges, removeAllEdges, removeAllVertices, removeEdge, removeEdge, removeVertex, setEdgeWeight, setEdgeWeight, vertexSet
-
Field Details
-
label
Represents the name of the graph -
timestamp
The timestamp of the current Network graph (i.e. the commit ID that the Network graph represents) -
directed
private final boolean directedWhether the edges are interpreted as directed- See Also:
-
multigraph
private final boolean multigraphWhether several edges between source and target are allowed- See Also:
-
-
Constructor Details
-
ServiceDependencyGraph
Creates the network graph from a given MicroserviceSystem.- Parameters:
microserviceSystem- the microservice system to build the graph from.
-
-
Method Details
-
toJsonObject
public com.google.gson.JsonObject toJsonObject()- Specified by:
toJsonObjectin interfaceDependencyGraphI<Microservice,RestCallEdge> - Specified by:
toJsonObjectin interfaceJsonSerializable- Returns:
- a JsonObject representing this
-