use of org.iobserve.analysis.data.graph.DeploymentNode in project iobserve-analysis by research-iobserve.
the class AdaptationCalculation method compareServers.
private void compareServers(final Set<DeploymentNode> servers) {
for (final DeploymentNode reDeplServer : servers) {
if (reDeplServer.getContainingComponents().size() == 0) {
// If the server dosn't contain any components => IGNORE
continue;
}
final DeploymentNode runServer = this.runtimeDeploymentNodes.get(reDeplServer.getResourceContainerID());
if (runServer == null) {
// It is an so far unused server!
final AcquireAction action = ResourceContainerActionFactory.createAcquireAction(reDeplServer);
this.rcActions.add(action);
} else {
// Server was and is still in use
this.runtimeDeploymentNodes.remove(runServer.getResourceContainerID(), runServer);
}
}
for (final DeploymentNode runServer : this.runtimeDeploymentNodes.values()) {
// AssemblyContext does not exist anymore in redeployment model!
final TerminateAction action = ResourceContainerActionFactory.createTerminateAction(runServer);
this.rcActions.add(action);
}
}
Aggregations