EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.codegen.simucontroller.workflow.jobs]

COVERAGE SUMMARY FOR SOURCE FILE [DetermineFailureTypesJob.java]

nameclass, %method, %block, %line, %
DetermineFailureTypesJob.java0%   (0/1)0%   (0/5)0%   (0/48)0%   (0/20)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class DetermineFailureTypesJob0%   (0/1)0%   (0/5)0%   (0/48)0%   (0/20)
DetermineFailureTypesJob (AbstractPCMWorkflowRunConfiguration): void 0%   (0/1)0%   (0/14)0%   (0/5)
execute (IProgressMonitor): void 0%   (0/1)0%   (0/27)0%   (0/11)
getName (): String 0%   (0/1)0%   (0/2)0%   (0/1)
rollback (IProgressMonitor): void 0%   (0/1)0%   (0/1)0%   (0/1)
setBlackboard (MDSDBlackboard): void 0%   (0/1)0%   (0/4)0%   (0/2)

1package de.uka.ipd.sdq.codegen.simucontroller.workflow.jobs;
2 
3import org.eclipse.core.runtime.IProgressMonitor;
4 
5import de.uka.ipd.sdq.codegen.simucontroller.runconfig.SimuComWorkflowConfiguration;
6import de.uka.ipd.sdq.reliability.core.FailureStatistics;
7import de.uka.ipd.sdq.reliability.core.MarkovEvaluationType;
8import de.uka.ipd.sdq.reliability.core.helper.MarkovFailureTypeHelper;
9import de.uka.ipd.sdq.workflow.IBlackboardInteractingJob;
10import de.uka.ipd.sdq.workflow.exceptions.JobFailedException;
11import de.uka.ipd.sdq.workflow.exceptions.RollbackFailedException;
12import de.uka.ipd.sdq.workflow.exceptions.UserCanceledException;
13import de.uka.ipd.sdq.workflow.mdsd.blackboard.MDSDBlackboard;
14import de.uka.ipd.sdq.workflow.pcm.blackboard.PCMResourceSetPartition;
15import de.uka.ipd.sdq.workflow.pcm.configurations.AbstractPCMWorkflowRunConfiguration;
16import de.uka.ipd.sdq.workflow.pcm.jobs.LoadPCMModelsIntoBlackboardJob;
17 
18/**
19 * Represents a step where the types of all possible failure-on-demand
20 * occurrences during the simulation are determined.
21 * 
22 * @author brosch
23 * 
24 */
25public class DetermineFailureTypesJob implements
26                IBlackboardInteractingJob<MDSDBlackboard> {
27 
28        /**
29         * The blackboard where the PCM model resides.
30         */
31        private MDSDBlackboard blackboard;
32 
33        /**
34         * The configuration of the workflow.
35         */
36        private AbstractPCMWorkflowRunConfiguration configuration = null;
37 
38        /**
39         * Provides functionality for managing failure types.
40         */
41        private MarkovFailureTypeHelper helper = new MarkovFailureTypeHelper();
42 
43        /**
44         * The constructor.
45         * 
46         * @param configuration
47         *            the configuration of the workflow
48         */
49        public DetermineFailureTypesJob(
50                        AbstractPCMWorkflowRunConfiguration configuration) {
51                super();
52                this.configuration = configuration;
53        }
54 
55        /*
56         * (non-Javadoc)
57         * 
58         * @seede.uka.ipd.sdq.workflow.IJob#execute(org.eclipse.core.runtime.
59         * IProgressMonitor)
60         */
61        public void execute(final IProgressMonitor monitor)
62                        throws JobFailedException, UserCanceledException {
63 
64                // Check for the "simulate failures" option:
65                SimuComWorkflowConfiguration config = (SimuComWorkflowConfiguration) configuration;
66                if (!config.getSimulateFailures()) {
67                        return;
68                }
69 
70                // Retrieve the PCM models that are already loaded into memory:
71                PCMResourceSetPartition pcmPartition = (PCMResourceSetPartition) this.blackboard
72                                .getPartition(LoadPCMModelsIntoBlackboardJob.PCM_MODELS_PARTITION_ID);
73 
74                // Derive the failure types for the simulation:
75                FailureStatistics.getInstance().setFailureTypes(
76                                helper.getFailureTypes(MarkovEvaluationType.POINTSOFFAILURE,
77                                                pcmPartition.getRepositories(), pcmPartition
78                                                                .getResourceEnvironment(), pcmPartition
79                                                                .getSystem()));
80        }
81 
82        /*
83         * (non-Javadoc)
84         * 
85         * @see de.uka.ipd.sdq.workflow.IJob#getName()
86         */
87        public String getName() {
88                return "Perform Failure Types Determination";
89        }
90 
91        /*
92         * (non-Javadoc)
93         * 
94         * @seede.uka.ipd.sdq.workflow.IJob#rollback(org.eclipse.core.runtime.
95         * IProgressMonitor)
96         */
97        public void rollback(IProgressMonitor monitor)
98                        throws RollbackFailedException {
99        }
100 
101        /*
102         * (non-Javadoc)
103         * 
104         * @see
105         * de.uka.ipd.sdq.workflow.IBlackboardInteractingJob#setBlackboard(de.uka
106         * .ipd.sdq.workflow.Blackboard)
107         */
108        public void setBlackboard(final MDSDBlackboard blackboard) {
109                this.blackboard = blackboard;
110        }
111}

[all classes][de.uka.ipd.sdq.codegen.simucontroller.workflow.jobs]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov