Changeset 481 for DCWoRMS/trunk/src/example/globalplugin
- Timestamp:
- 10/08/12 10:23:45 (13 years ago)
- Location:
- DCWoRMS/trunk/src/example/globalplugin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/trunk/src/example/globalplugin/BaseGlobalPlugin.java
r478 r481 4 4 import schedframe.PluginConfiguration; 5 5 import schedframe.events.scheduling.SchedulingEventType; 6 import schedframe.scheduling. WorkloadUnitListImpl;6 import schedframe.scheduling.TaskListImpl; 7 7 import schedframe.scheduling.manager.resources.ResourceManager; 8 8 import schedframe.scheduling.plugin.SchedulingPluginConfiguration; … … 11 11 import schedframe.scheduling.queue.TaskQueue; 12 12 import schedframe.scheduling.queue.TaskQueueList; 13 import schedframe.scheduling.tasks. WorkloadUnit;13 import schedframe.scheduling.tasks.TaskInterface; 14 14 import schemas.StringValueWithUnit; 15 15 … … 22 22 } 23 23 24 public int place JobsInQueues(WorkloadUnitListImpl newJobs, TaskQueueList queues, ResourceManager resourceManager,24 public int placeTasksInQueues(TaskListImpl newTasks, TaskQueueList queues, ResourceManager resourceManager, 25 25 ModuleList moduleList) { 26 26 … … 28 28 TaskQueue queue = queues.get(0); 29 29 30 for (int i = 0; i < new Jobs.size(); i++) {31 WorkloadUnit task = newJobs.get(i);30 for (int i = 0; i < newTasks.size(); i++) { 31 TaskInterface<?> task = newTasks.get(i); 32 32 queue.add(task); 33 33 } -
DCWoRMS/trunk/src/example/globalplugin/GridFCFSLoadBalancingPlugin.java
r478 r481 19 19 import schedframe.scheduling.plugin.grid.ModuleList; 20 20 import schedframe.scheduling.plugin.grid.ResourceDiscovery; 21 import schedframe.scheduling.queue.QueueDescription; 21 22 import schedframe.scheduling.queue.TaskQueue; 22 import schedframe.scheduling.queue.QueueDescription;23 23 import schedframe.scheduling.queue.TaskQueueList; 24 24 import schedframe.scheduling.tasks.TaskInterface; … … 29 29 private Log log = LogFactory.getLog(GridFCFSLoadBalancingPlugin.class); 30 30 31 public SchedulingPlanInterface schedule(SchedulingEvent event,31 public SchedulingPlanInterface<?> schedule(SchedulingEvent event, 32 32 TaskQueueList queues, 33 33 JobRegistry jobRegistry, … … 83 83 84 84 private int findLeastLoadedResourceIdx(List<SchedulerDescription> availableResources){ 85 86 85 int resourceIdx = -1; 87 86 long minLoad = Long.MAX_VALUE; 87 88 88 for(int i = 0; i < availableResources.size(); i++){ 89 89 SchedulerDescription sd = availableResources.get(i);
Note: See TracChangeset
for help on using the changeset viewer.