source: xssim/branches/tpiontek/src/example/gridplugin/BaseGlobalPlugin.java @ 195

Revision 195, 828 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.Queue;
8import test.rewolucja.scheduling.queue.QueueList;
9import test.rewolucja.task.JobList;
10
11public abstract class BaseGlobalPlugin implements GlobalSchedulingPlugin {
12
13        public int placeJobsInQueues(JobList newJobs, QueueList queues, ResourceManagerInterface resourceManager,
14                        ModuleList moduleList) {
15
16                // get the first queue from all available queues.
17                Queue queue = queues.get(0);
18
19                for (int i = 0; i < newJobs.size(); i++) {
20                        GSSIMJobInterface<?> task = newJobs.get(i);
21                        queue.add(task);
22                }
23
24                return 0;
25        }
26}
Note: See TracBrowser for help on using the repository browser.