Changeset 137 for xssim/trunk/src
- Timestamp:
- 03/15/12 13:32:43 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
xssim/trunk/src/gridsim/gssim/SubmittedTask.java
r104 r137 18 18 import schedframe.scheduling.TaskInterface; 19 19 import schedframe.scheduling.utils.ResourceParameterName; 20 import test.rewolucja.resources.ProcessingElements; 21 import test.rewolucja.resources.physical.base.ComputingResource; 20 22 21 23 /** … … 29 31 protected int estimatedDuration; 30 32 protected List<ResourceHistoryItem> usedResources; 33 protected List<String> visitedResources; 31 34 32 35 public SubmittedTask(AbstractExecutable gridlet) { … … 36 39 if(gridlet.requireReservation()) 37 40 this.reservID_ = Integer.valueOf(gridlet.getReservationId()); 41 this.visitedResources = new ArrayList<String>(); 38 42 } 39 43 … … 194 198 (prevStatus == Gridlet.PAUSED && status == Gridlet.RESUMED) ) 195 199 { 200 196 201 startExecTime_ = clock; 197 202 gridlet_.setExecStartTime(startExecTime_); 203 ProcessingElements pes = (ProcessingElements) getUsedResources().get(getUsedResources().size()-1).getResourceUnits().get(ResourceParameterName.PROCESSINGELEMENTS); 204 for (ComputingResource resource : pes) { 205 206 visitResource(resource.getName()); 207 ComputingResource parent = resource.getParent(); 208 209 while (parent != null && !getVisitedResources().contains(parent.getName())) { 210 visitResource(parent.getName()); 211 parent = parent.getParent(); 212 } 213 } 198 214 } 199 215 } … … 236 252 } 237 253 238 public void addToResPath(String resName){254 /*public void addToResPath(String resName){ 239 255 task.addToResPath(resName); 240 256 … … 243 259 public String getResPath(){ 244 260 return task.getResPath(); 261 }*/ 262 263 public void visitResource(String resName){ 264 task.visitResource(resName); 265 } 266 267 public List<String> getVisitedResources(){ 268 return task.getVisitedResources(); 245 269 } 246 270 }
Note: See TracChangeset
for help on using the changeset viewer.