- Timestamp:
- 10/08/12 10:23:45 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/trunk/src/example/localplugin/FCFSCPUFreqScalingClusterLocalPlugin.java
r478 r481 1 1 package example.localplugin; 2 2 3 import gridsim.Gridlet; 3 import gridsim.gssim.DCWormsTags; 4 import gssim.schedframe.scheduling.Executable; 4 5 5 6 import java.util.ArrayList; … … 28 29 import schedframe.scheduling.queue.TaskQueue; 29 30 import schedframe.scheduling.queue.TaskQueueList; 30 import schedframe.scheduling.tasks.SubmittedTask;31 31 import schedframe.scheduling.tasks.TaskInterface; 32 32 import schedframe.scheduling.tasks.WorkloadUnit; … … 39 39 } 40 40 41 public SchedulingPlanInterface schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,41 public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry, 42 42 ResourceManager resManager, ModuleList modules) { 43 43 … … 58 58 TaskInterface<?> task = (TaskInterface<?>) job; 59 59 // if status of the tasks in READY 60 if (task.getStatus() == Gridlet.READY) {60 if (task.getStatus() == DCWormsTags.READY) { 61 61 62 62 Map<ResourceUnitName, ResourceUnit> choosenResources = chooseResourcesForExecution(resourceManager, task); … … 76 76 case TASK_FINISHED: 77 77 TaskFinishedEvent finEvent = (TaskFinishedEvent) event; 78 SubmittedTask subTask = (SubmittedTask )jobRegistry.getSubmittedTask(finEvent.getJobId(), finEvent.getTaskId());79 UsedResourceList<ResourceHistoryItem> usedResourcesList = subTask.getUsedResources();78 Executable exec = (Executable) jobRegistry.getExecutable(finEvent.getJobId(), finEvent.getTaskId()); 79 UsedResourceList<ResourceHistoryItem> usedResourcesList = exec.getUsedResources(); 80 80 ProcessingElements pes = (ProcessingElements)usedResourcesList.getLast().getResourceUnits().get(StandardResourceUnitName.PE); 81 81 List<Processor> processors = new ArrayList<Processor>(); … … 89 89 case TASK_REQUESTED_TIME_EXPIRED: 90 90 TaskRequestedTimeExpiredEvent timExpEvent = (TaskRequestedTimeExpiredEvent) event; 91 subTask = (SubmittedTask )jobRegistry.getSubmittedTask(timExpEvent.getJobId(), timExpEvent.getTaskId());92 usedResourcesList = subTask.getUsedResources();91 exec = (Executable) jobRegistry.getExecutable(timExpEvent.getJobId(), timExpEvent.getTaskId()); 92 usedResourcesList = exec.getUsedResources(); 93 93 pes = (ProcessingElements)usedResourcesList.getLast().getResourceUnits().get(StandardResourceUnitName.PE); 94 94 processors = new ArrayList<Processor>(); … … 101 101 TaskInterface<?> task = (TaskInterface<?>) job; 102 102 // if status of the tasks in READY 103 if (task.getStatus() == Gridlet.READY) {103 if (task.getStatus() == DCWormsTags.READY) { 104 104 105 105 Map<ResourceUnitName, ResourceUnit> choosenResources = chooseResourcesForExecution(resourceManager, task);
Note: See TracChangeset
for help on using the changeset viewer.