/[xulu]/branches/1.8-gt2-2.6/src/appl/parallel/model/AbstractParallelStepModel.java
ViewVC logotype

Contents of /branches/1.8-gt2-2.6/src/appl/parallel/model/AbstractParallelStepModel.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations)
Wed Feb 25 11:54:01 2009 UTC (15 years, 9 months ago) by mojays
Original Path: trunk/src/appl/parallel/model/AbstractParallelStepModel.java
File size: 1886 byte(s)
First Commit, corresponds to Revision 1008 of Wikisquare-SVN 
1 package appl.parallel.model;
2
3 import appl.parallel.spmd.AdvancedSPMDClientController;
4 import appl.parallel.spmd.AdvancedSPMDClientInterface;
5 import appl.parallel.spmd.SPMDClientInterface;
6 import edu.bonn.xulu.model.AbstractStepModel;
7 import edu.bonn.xulu.model.ModelContentManager;
8 import edu.bonn.xulu.model.event.ModelStepFinishedEvent;
9 import edu.bonn.xulu.model.event.ModelStepStartedEvent;
10
11 /**
12 * This class is used instead of the {@link AbstractStepModel} for implementation
13 * of parallel algorithms. It provides access to the {@link SPMDClientInterface}.
14 *
15 * @author Dominik Appl
16 */
17 public abstract class AbstractParallelStepModel extends AbstractStepModel
18 implements ParallelStepModel {
19
20 SPMDClientInterface SPMDController;
21
22 /* (non-Javadoc)
23 * @see appl.parallel.model.ParallelStepModel#getSPMDController()
24 */
25 public SPMDClientInterface getSPMDController() {
26 if (SPMDController == null) {
27 throw new UnsupportedOperationException(
28 "SPMDController is null!"
29 + "You cannot use the SPMDController before the performInit-method");
30 }
31 return SPMDController;
32 }
33
34 /**
35 * @return the Advanced SPMD controller which provides access to advanced parallel functionality
36 * like preloading or multithreading
37 */
38 public AdvancedSPMDClientInterface getAdvancedSPMDController() {
39 return (AdvancedSPMDClientController) getSPMDController();
40 }
41
42 /**
43 * A new instance. See {@link AbstractStepModel#AbstractStepModel(ModelContentManager)} for details
44 *
45 */
46 public AbstractParallelStepModel(ModelContentManager contentManager) {
47 super(contentManager);
48 }
49
50 /* (non-Javadoc)
51 * @see appl.parallel.model.ParallelStepModel#setSPMDController(appl.parallel.spmd.SPMDClientController)
52 */
53 public void setSPMDController(SPMDClientInterface controller) {
54 this.SPMDController = controller;
55 }
56
57 }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26