- Timestamp:
- 10/31/12 13:52:06 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/trunk/build/classes/example/localplugin/FCFSRandomClusterLocalPlugin.java
r477 r539 1 1 package example.localplugin; 2 2 3 import gridsim. Gridlet;3 import gridsim.dcworms.DCWormsTags; 4 4 5 5 import java.util.List; … … 19 19 import schedframe.scheduling.tasks.WorkloadUnit; 20 20 21 public class FCFSRandomClusterLocalPlugin extends BaseLocal Plugin {21 public class FCFSRandomClusterLocalPlugin extends BaseLocalSchedulingPlugin { 22 22 23 23 private Random rand; … … 41 41 // BaseLocalPlugin.placeJobsInQueues() method) 42 42 TaskQueue q = queues.get(0); 43 43 44 // check all tasks in queue 44 45 45 for (int i = 0; i < q.size(); i++) { 46 WorkloadUnit <?>job = q.get(i);46 WorkloadUnit job = q.get(i); 47 47 TaskInterface<?> task = (TaskInterface<?>) job; 48 48 // if status of the tasks in READY 49 if (task.getStatus() == Gridlet.READY) { 50 /*for(ResourceUnitName key:resManager.getSharedResourceUnits().keySet()){ 51 System.out.println(key.getName()); 52 }*/ 53 addToSchedulingPlan(plan, task); 54 /*String nodeName = chooseRandomProvider(resourceManager); 49 if (task.getStatus() == DCWormsTags.READY) { 50 51 String nodeName = chooseRandomProvider(resourceManager); 55 52 if (nodeName != null) { 56 53 addToSchedulingPlan(plan, task, nodeName); 57 } */54 } 58 55 } 59 56 } … … 68 65 return nodes.get(nodeIdx).getName(); 69 66 } 70 71 public String getName() {72 return getClass().getName();73 }74 75 67 76 68 }
Note: See TracChangeset
for help on using the changeset viewer.