Changeset 517 for DCWoRMS/trunk/src
- Timestamp:
- 10/16/12 09:38:14 (13 years ago)
- Location:
- DCWoRMS/trunk/src/schedframe
- Files:
-
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/trunk/src/schedframe/resources/computing/ComputingResource.java
r512 r517 237 237 238 238 public PowerInterface getPowerInterface(){ 239 Extension extension = getExtension(ExtensionType.ENERGY_EXTENSION); 240 if(extension != null){ 241 EnergyExtension ee = (EnergyExtension)extension; 242 return ee.getPowerInterface(); 243 } 244 return null; 245 } 246 247 public AirThroughputInterface getAirThroughputInterface(){ 248 Extension extension = getExtension(ExtensionType.ENERGY_EXTENSION); 249 if(extension != null){ 250 EnergyExtension ee = (EnergyExtension)extension; 251 return ee.getAirThroughputInterface(); 252 } 253 return null; 254 } 255 256 private Extension getExtension(ExtensionType type){ 239 257 if (extensionList != null) { 240 258 for (Extension extension : extensionList) { 241 if (extension.getType() == ExtensionType.ENERGY_EXTENSION) { 242 EnergyExtension ee = (EnergyExtension)extension; 243 return ee.getPowerInterface(); 259 if (extension.getType() == type) { 260 return extension; 244 261 } 245 262 } … … 248 265 } 249 266 250 public AirThroughputInterface getAirThroughputInterface(){251 if (extensionList != null) {252 for (Extension extension : extensionList) {253 if (extension.getType() == ExtensionType.ENERGY_EXTENSION) {254 EnergyExtension ee = (EnergyExtension)extension;255 return ee.getAirThroughputInterface();256 }257 }258 }259 return null;260 }261 262 267 public Scheduler getScheduler() { 263 268 return scheduler; -
DCWoRMS/trunk/src/schedframe/scheduling/manager/resources/LocalResourceManager.java
r490 r517 29 29 import schedframe.resources.units.StandardResourceUnitName; 30 30 import schedframe.scheduling.Scheduler; 31 import schedframe.scheduling.plugin.local.ResourceAllocation Interface;32 33 34 public class LocalResourceManager implements ResourceAllocation Interface, ResourceManager {31 import schedframe.scheduling.plugin.local.ResourceAllocation; 32 33 34 public class LocalResourceManager implements ResourceAllocation, ResourceManager { 35 35 36 36 //private Log log = LogFactory.getLog(ResourceManager.class); … … 38 38 protected List<ComputingResource> computingResources; 39 39 protected List<Scheduler> schedulers; 40 //protected ResourceCharacteristics resourceCharacteristic;41 40 protected Map<ResourceUnitName, List<ResourceUnit>> resourceUnits; 42 41 -
DCWoRMS/trunk/src/schedframe/scheduling/manager/resources/ResourceManager.java
r477 r517 22 22 23 23 public List<? extends ComputingResource> getResourcesByTypeWithStatus(ResourceType type, ResourceStatus status) throws ResourceException; 24 25 //public ResourceCharacteristics getResourceCharacteristic();26 24 27 25 public Map<ResourceUnitName, List<ResourceUnit>> getSharedResourceUnits(); -
DCWoRMS/trunk/src/schedframe/scheduling/plugin/local/ResourceAllocation.java
r477 r517 6 6 import schedframe.resources.units.ResourceUnitName; 7 7 8 public interface ResourceAllocation Interface{8 public interface ResourceAllocation { 9 9 10 10 /** … … 25 25 public void freeResources(Map<ResourceUnitName, ResourceUnit> lastUsedResources); 26 26 27 //public void allocateProcessors(Map<ResourceParameterName, ResourceUnit> freeRes);28 29 30 //public void clearPendingProcessors(List<Resource> choosenResources);31 32 33 27 } -
DCWoRMS/trunk/src/schedframe/scheduling/policy/AbstractManagementSystem.java
r493 r517 26 26 import schedframe.scheduling.plugin.estimation.ExecutionTimeEstimationPlugin; 27 27 import schedframe.scheduling.plugin.grid.ModuleList; 28 import schedframe.scheduling.plugin.local.ResourceAllocation Interface;28 import schedframe.scheduling.plugin.local.ResourceAllocation; 29 29 import schedframe.scheduling.queue.TaskQueue; 30 30 import schedframe.scheduling.queue.TaskQueueList; … … 104 104 } 105 105 106 public ResourceAllocation InterfacegetAllocationManager() {107 if (resourceManager instanceof ResourceAllocation Interface)108 return (ResourceAllocation Interface) resourceManager;106 public ResourceAllocation getAllocationManager() { 107 if (resourceManager instanceof ResourceAllocation) 108 return (ResourceAllocation) resourceManager; 109 109 else 110 110 return null;
Note: See TracChangeset
for help on using the changeset viewer.