source: xssim/src/example/gridplugin/BaseGlobalPlugin.java @ 104

Revision 104, 896 bytes checked in by wojtekp, 13 years ago (diff)
  • Property svn:mime-type set to text/plain
Line 
1package example.gridplugin;
2
3import schedframe.scheduling.plugin.grid.GlobalSchedulingPlugin;
4import schedframe.scheduling.plugin.grid.ModuleList;
5import test.rewolucja.GSSIMJobInterface;
6import test.rewolucja.resources.manager.interfaces.ResourceManagerInterface;
7import test.rewolucja.scheduling.queue.GSSIMQueue;
8import test.rewolucja.scheduling.queue.QueueList;
9import test.rewolucja.task.JobList;
10
11public abstract class BaseGlobalPlugin implements GlobalSchedulingPlugin<org.qcg.broker.schemas.schedulingplan.SchedulingPlan> {
12
13        public int placeJobsInQueues(JobList newJobs,
14                        QueueList queues,
15                        ResourceManagerInterface resourceManager, ModuleList moduleList) {
16               
17                // get the first queue from all available queues.
18                GSSIMQueue queue = queues.get(0);
19
20                for(int i = 0; i < newJobs.size(); i++){
21                        GSSIMJobInterface<?> task = newJobs.get(i);
22                        queue.add(task);
23                }
24
25                return 0;
26        }
27}
Note: See TracBrowser for help on using the repository browser.