use of org.iobserve.planning.systemadaptation.DeallocateAction in project iobserve-analysis by research-iobserve.
the class AssemblyContextActionFactory method generateDeallocateAction.
/**
* Create a deallocation action.
*
* @param runtimeNode
* node to be deallocated
* @return returns the deallocation action
*/
public static DeallocateAction generateDeallocateAction(final ComponentNode runtimeNode) {
final SystemadaptationFactory factory = SystemadaptationFactory.eINSTANCE;
final DeallocateAction action = factory.createDeallocateAction();
AssemblyContextActionFactory.setSourceAssemblyContext(action, runtimeNode.getAssemblyContextID());
final Allocation runAllocation = ActionFactory.getRuntimeModels().getAllocationModel();
action.setOldAllocationContext(ActionFactory.getAllocationContext(runtimeNode.getAllocationContextID(), runAllocation));
return action;
}
use of org.iobserve.planning.systemadaptation.DeallocateAction in project iobserve-analysis by research-iobserve.
the class ResourceContainerActionFactory method createDeallocateAction.
/**
* Create a deallocate action.
*
* @param runtimeServer
* the node going to be deallocated
* @return the action
*/
public static DeallocateAction createDeallocateAction(final DeploymentNode runtimeServer) {
final DeallocateAction action = SystemadaptationFactory.eINSTANCE.createDeallocateAction();
final ResourceEnvironment runtimeResourceEnvironment = ActionFactory.getRuntimeModels().getResourceEnvironmentModel();
ResourceContainerActionFactory.initializeResourceContainerAction(action, runtimeServer, runtimeResourceEnvironment);
return action;
}
Aggregations