use of org.iobserve.analysis.deployment.UndeploymentCompositeStage in project iobserve-analysis by research-iobserve.
the class AnalysisConfiguration method containerManagement.
/**
* Create all stages necessary for the container management.
*
* @param configuration
* potential configuration parameter for filters
* @param resourceEnvironmentModelProvider
* @param allocationModelProvider
* @param systemModelProvider
* @param correspondenceModelProvider
* @throws ConfigurationException
* when configuration fails
*/
private void containerManagement(final kieker.common.configuration.Configuration configuration, final IModelProvider<ResourceEnvironment> resourceEnvironmentModelProvider, final IModelProvider<Allocation> allocationModelProvider, final IModelProvider<System> systemModelProvider, final ICorrespondence correspondenceModelProvider) throws ConfigurationException {
if (configuration.getBooleanProperty(ConfigurationKeys.CONTAINER_MANAGEMENT, false)) {
/**
* allocation.
*/
this.allocationStage = new AllocationStage(resourceEnvironmentModelProvider);
/**
* connect ports.
*/
this.eventDispatcher.registerOutput(IAllocationEvent.class);
this.connectPorts(this.eventDispatcher.getOutputPort(IAllocationEvent.class), this.allocationStage.getInputPort());
/**
* deallocation.
*/
this.deallocationStage = new DeallocationStage(resourceEnvironmentModelProvider);
/**
* connect ports.
*/
this.eventDispatcher.registerOutput(IDeallocationEvent.class);
this.connectPorts(this.eventDispatcher.getOutputPort(IDeallocationEvent.class), this.deallocationStage.getInputPort());
/**
* deployment.
*/
this.eventDispatcher.registerOutput(IDeployedEvent.class);
this.deploymentStage = new DeploymentCompositeStage(resourceEnvironmentModelProvider, allocationModelProvider, systemModelProvider, correspondenceModelProvider);
/**
* connect ports.
*/
this.connectPorts(this.eventDispatcher.getOutputPort(IDeployedEvent.class), this.deploymentStage.getDeployedInputPort());
/**
* undeployment.
*/
this.eventDispatcher.registerOutput(IUndeployedEvent.class);
this.undeploymentStage = new UndeploymentCompositeStage(resourceEnvironmentModelProvider, allocationModelProvider, systemModelProvider, correspondenceModelProvider);
/**
* connect ports.
*/
this.connectPorts(this.eventDispatcher.getOutputPort(IUndeployedEvent.class), this.undeploymentStage.getUndeployedInputPort());
/**
* dependent features.
*/
this.createContainerManagementSink(configuration);
}
}
use of org.iobserve.analysis.deployment.UndeploymentCompositeStage in project iobserve-analysis by research-iobserve.
the class AnalysisConfiguration method containerManagement.
/**
* Create all stages necessary for the container management.
*
* @param configuration
* potential configuration parameter for filters
* @param resourceEnvironmentModelResource
* @param systemModelResource
* @param allocationModelResource
* @param correspondenceModelResource
*
* @throws ConfigurationException
* when configuration fails
*/
private void containerManagement(final kieker.common.configuration.Configuration configuration, final Neo4JModelResource<ResourceEnvironment> resourceEnvironmentModelResource, final Neo4JModelResource<System> systemModelResource, final Neo4JModelResource<Allocation> allocationModelResource, final Neo4JModelResource<CorrespondenceModel> correspondenceModelResource) throws ConfigurationException {
if (configuration.getBooleanProperty(ConfigurationKeys.CONTAINER_MANAGEMENT, false)) {
/**
* allocation.
*/
this.allocationStage = new AllocationStage(resourceEnvironmentModelResource);
final IEventMatcher<IAllocationEvent> allocationMatcher = new ImplementsEventMatcher<>(IAllocationEvent.class, null);
/**
* connect ports.
*/
this.eventDispatcher.registerOutput(allocationMatcher);
this.connectPorts(allocationMatcher.getOutputPort(), this.allocationStage.getInputPort());
/**
* deallocation.
*/
this.deallocationStage = new DeallocationStage(resourceEnvironmentModelResource);
/**
* connect ports.
*/
final IEventMatcher<IDeallocationEvent> deallocationMatcher = new ImplementsEventMatcher<>(IDeallocationEvent.class, null);
this.eventDispatcher.registerOutput(deallocationMatcher);
this.connectPorts(deallocationMatcher.getOutputPort(), this.deallocationStage.getInputPort());
/**
* deployment.
*/
final IEventMatcher<IDeployedEvent> deployedEventMatcher = new ImplementsEventMatcher<>(IDeployedEvent.class, null);
this.eventDispatcher.registerOutput(deployedEventMatcher);
this.deploymentStage = new DeploymentCompositeStage(resourceEnvironmentModelResource, systemModelResource, allocationModelResource, correspondenceModelResource);
/**
* connect ports.
*/
this.connectPorts(deployedEventMatcher.getOutputPort(), this.deploymentStage.getDeployedInputPort());
/**
* undeployment.
*/
final IEventMatcher<IUndeployedEvent> undeployedEventMatcher = new ImplementsEventMatcher<>(IUndeployedEvent.class, null);
this.eventDispatcher.registerOutput(undeployedEventMatcher);
this.undeploymentStage = new UndeploymentCompositeStage(resourceEnvironmentModelResource, systemModelResource, allocationModelResource, correspondenceModelResource);
/**
* connect ports.
*/
this.connectPorts(undeployedEventMatcher.getOutputPort(), this.undeploymentStage.getUndeployedInputPort());
/**
* dependent features.
*/
this.createContainerManagementSink(configuration, resourceEnvironmentModelResource, systemModelResource, allocationModelResource);
}
}
Aggregations