public class ModelManager extends Object
| Constructor and Description |
|---|
ModelManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(String runtime,
Node source,
Node target)
Add an edge to the dependency graph.
|
void |
addNode(String runtime,
Node node)
Add a node to the dependency graph.
|
Model |
getComponentDependencyModel(long startTime,
long endTime,
String runtime,
String namespace,
String instance,
String component)
Get the dependency model for a particular component in a namespace for a given time period.
|
Map<String,Model> |
getCurrentRuntimeModels()
Get the nodes in the current dependency model.
|
Model |
getInstanceDependencyModel(long startTime,
long endTime,
String runtime,
String namespace,
String instance)
Get the dependency model for a particular instance in a namespace for a given time period.
|
Model |
getNamespaceDependencyModel(long startTime,
long endTime,
String runtime,
String namespace)
Get the dependency model for a particular namespace for a given time period.
|
Node |
getNode(String runtime,
String namespace,
String instance,
String component)
Get a node representing a component belonging to an instance in a particular namespace.
|
Node |
getOrGenerateNode(String runtime,
String namespace,
String instance,
String component)
Get the existing node if it exists or generate a new node in the dependency graph.
|
Model |
getRuntimeDependencyModel(long startTime,
long endTime,
String runtime)
Get the dependency model for a particular runtime for a given time period.
|
boolean |
removeNode(String runtime,
String namespace,
String instance,
String component)
Remove a node from the dependency graph.
|
public ModelManager()
throws ModelException
ModelExceptionpublic Node getNode(String runtime, String namespace, String instance, String component)
runtime - The runtime the instance belongs tonamespace - The namespace the instance belongs toinstance - The name of the instance the component belongs tocomponent - The name of the componentpublic Node getOrGenerateNode(String runtime, String namespace, String instance, String component)
runtime - The runtime the instance belongs tonamespace - The namespace the instance belongs toinstance - The name of the instance the component belongs tocomponent - The name of the componentpublic void addNode(String runtime, Node node)
runtime - The runtime to which the node should be addednode - The node to be addedpublic void addEdge(String runtime, Node source, Node target)
source - The source node of the edgetarget - The target node of the edgepublic boolean removeNode(String runtime, String namespace, String instance, String component)
runtime - The runtime to which the node belongs tonamespace - The namespace the node belongs toinstance - The instance the node belongs tocomponent - The component name of the nodepublic Map<String,Model> getCurrentRuntimeModels()
public Model getRuntimeDependencyModel(long startTime, long endTime, String runtime) throws GraphStoreException
startTime - The start time of the time periodendTime - The end time of the time periodruntime - The runtime of which the dependency model should be fetchedGraphStoreException - If loading the model failedpublic Model getNamespaceDependencyModel(long startTime, long endTime, String runtime, String namespace) throws GraphStoreException
startTime - The start time of the time periodendTime - The end time of the time periodruntime - The runtime the namespace belongs tonamespace - The namespace of which the dependency model should be fetchedGraphStoreException - If loading the model failedpublic Model getInstanceDependencyModel(long startTime, long endTime, String runtime, String namespace, String instance) throws GraphStoreException
startTime - The start time of the time periodendTime - The end time of the time periodruntime - The runtime the namespace belongs tonamespace - The namespace the instance belongs toinstance - The instance of which the dependency model should be fetchedGraphStoreException - If loading the model failedpublic Model getComponentDependencyModel(long startTime, long endTime, String runtime, String namespace, String instance, String component) throws GraphStoreException
startTime - The start time of the time periodendTime - The end time of the time periodruntime - The runtime the namespace belongs tonamespace - The namespace the instance belongs toinstance - The instance the component belongs tocomponent - The component of which the dependency model should be fetchedGraphStoreException - If loading the model failedCopyright © 2019 WSO2. All rights reserved.