- Timestamp:
- 06/03/14 15:12:11 (11 years ago)
- Location:
- DCWoRMS/branches/coolemall/src/schedframe/scheduling/tasks
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/schedframe/scheduling/tasks/Task.java
r1207 r1362 1 1 package schedframe.scheduling.tasks; 2 3 import gridsim.dcworms.DCWormsTags; 2 4 3 5 import java.io.StringReader; … … 439 441 public boolean isFinished(){ 440 442 if(processes == null) 441 return (status > 3 && status <= 6);443 return (status >= DCWormsTags.SUCCESS && status <= DCWormsTags.FAILED); 442 444 443 445 for(int i = 0; i < processes.size(); i++){ -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/tasks/phases/ExecutionProfile.java
r1207 r1362 3 3 import java.util.LinkedList; 4 4 5 public class ResourceConsumptionProfile {5 public class ExecutionProfile { 6 6 7 7 protected LinkedList<ResourceConsumption> resourceConsumptionList; 8 8 protected long usefulWork; 9 9 private int currentPhase; 10 11 public ResourceConsumptionProfile() { 12 this.resourceConsumptionList = new LinkedList<ResourceConsumption>(); 13 this.currentPhase = -1; 14 } 15 16 public ResourceConsumptionProfile(LinkedList<ResourceConsumption> resourceConsumptionList) { 10 11 public ExecutionProfile(LinkedList<ResourceConsumption> resourceConsumptionList) { 17 12 this.resourceConsumptionList = resourceConsumptionList; 18 this.currentPhase = -1;13 this.currentPhase = 0; 19 14 } 20 15 … … 24 19 25 20 public ResourceConsumption getCurrentResourceConsumption(){ 26 if(currentPhase < resourceConsumptionList.size()) 27 return resourceConsumptionList.get(currentPhase); 28 else 29 return null; 21 return resourceConsumptionList.get(currentPhase); 30 22 } 31 23 … … 45 37 this.usefulWork = usefulWork; 46 38 } 39 40 public boolean isLast(){ 41 if(currentPhase == resourceConsumptionList.size() - 1){ 42 return true; 43 } 44 return false; 45 } 47 46 }
Note: See TracChangeset
for help on using the changeset viewer.