source: xssim/trunk/src/test/rewolucja/scheduling/ManagementSystemFactory.java @ 155

Revision 155, 1.0 KB checked in by wojtekp, 13 years ago (diff)
  • Property svn:mime-type set to text/plain
Line 
1package test.rewolucja.scheduling;
2
3import gridsim.gssim.GssimConstants;
4import schedframe.scheduling.plugin.estimation.ExecTimeEstimationPlugin;
5import test.rewolucja.resources.ResourceType;
6import test.rewolucja.resources.description.ExecResourceDescription;
7import test.rewolucja.scheduling.implementation.GridBroker;
8import test.rewolucja.scheduling.implementation.LocalManagementSystem;
9import test.rewolucja.scheduling.implementation.ManagementSystem;
10
11public class ManagementSystemFactory {
12
13        public static ManagementSystem createManagementSystem(ExecResourceDescription erd, ResourceType type,String schedulingPluginName, ExecTimeEstimationPlugin execTimeEstimationPlugin) throws Exception{
14
15                switch(type){
16                        case COMPUTING_GRID: return new GridBroker(erd.getResourceId(), schedulingPluginName, execTimeEstimationPlugin, erd);
17                        case COMPUTING_NODE: return new LocalManagementSystem(erd.getResourceId(), GssimConstants.MANAGEMENT_SYSTEM, schedulingPluginName, execTimeEstimationPlugin, erd);
18                        default: return null;
19                }
20        }
21}
Note: See TracBrowser for help on using the repository browser.