Ignore:
Timestamp:
06/06/14 10:48:32 (11 years ago)
Author:
wojtekp
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/local/LocalManagementSystem.java

    r1374 r1377  
    238238                                Executable exec = (Executable) execTask; 
    239239                                Map<ResourceUnitName, ResourceUnit> lastUsed = exec.getAllocatedResources().getLast().getResourceUnits(); 
    240                                 getAllocationManager().freeResources(lastUsed); 
     240                                getAllocationManager().freeResources(lastUsed, true); 
    241241                                 
    242242                                saveExecutionHistory(exec, exec.getCompletionPercentage(), exec.getEstimatedDuration()); 
     
    262262                                Executable exec = (Executable) execTask; 
    263263 
    264                                 boolean status = allocateResources(exec, resources); 
     264                                boolean status = allocateResources(exec, resources, true); 
    265265                                if(status == false){ 
    266266                                        TaskList newTasks = new TaskListImpl(); 
     
    332332 
    333333                Executable exec = (Executable)task; 
    334                 boolean allocationStatus = allocateResources(exec, choosenResources); 
     334                boolean allocationStatus = allocateResources(exec, choosenResources, false); 
    335335                if(allocationStatus == false){ 
    336336                        log.info("Task " + task.getJobId() + "_" + task.getId() + " requires more resources than is available at this moment."); 
     
    417417 
    418418                Map<ResourceUnitName, ResourceUnit> lastUsed = exec.getAllocatedResources().getLast().getResourceUnits(); 
    419                 getAllocationManager().freeResources(lastUsed); 
     419                getAllocationManager().freeResources(lastUsed, true); 
    420420                 
    421421                //TODO calculate the value of completion 
     
    727727        } 
    728728         
    729         public boolean allocateResources(Executable exec, Map<ResourceUnitName, ResourceUnit> choosenResources){ 
    730                 boolean allocationStatus = getAllocationManager().allocateResources(choosenResources); 
     729        public boolean allocateResources(Executable exec, Map<ResourceUnitName, ResourceUnit> choosenResources, boolean exclusive){ 
     730                boolean allocationStatus = getAllocationManager().allocateResources(choosenResources, exclusive); 
    731731                if(allocationStatus){ 
    732732                        ResourceHistoryItem resourceHistoryItem = new ResourceHistoryItem(choosenResources); 
Note: See TracChangeset for help on using the changeset viewer.