Ignore:
Timestamp:
07/15/14 16:26:31 (11 years ago)
Author:
wojtekp
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/branches/coolemall/src/schedframe/scheduling/tasks/phases/ExecutionProfile.java

    r1362 r1415  
    55public class ExecutionProfile { 
    66         
    7         protected LinkedList<ResourceConsumption> resourceConsumptionList; 
     7        protected LinkedList<ExecutionPhase> resourceConsumptionList; 
    88        protected long usefulWork; 
     9        protected double completionPercentage; 
    910        private int currentPhase; 
     11         
    1012 
    11         public ExecutionProfile(LinkedList<ResourceConsumption> resourceConsumptionList) { 
     13        public ExecutionProfile(LinkedList<ExecutionPhase> resourceConsumptionList) { 
    1214                this.resourceConsumptionList = resourceConsumptionList; 
     15                this.completionPercentage = 0; 
    1316                this.currentPhase = 0; 
    1417        } 
    1518         
    16         public LinkedList<ResourceConsumption> getResourceConsumptionList(){ 
     19        public LinkedList<ExecutionPhase> getResourceConsumptionList(){ 
    1720                return resourceConsumptionList; 
    1821        } 
    1922         
    20         public ResourceConsumption getCurrentResourceConsumption(){ 
     23        public ExecutionPhase getCurrentResourceConsumption(){ 
    2124                return resourceConsumptionList.get(currentPhase); 
    2225        } 
     
    4447                return false; 
    4548        } 
     49 
     50        public double getCompletionPercentage() { 
     51                return completionPercentage; 
     52        } 
     53 
     54        public void setCompletionPercentage(double completionPercentage) { 
     55                this.completionPercentage = completionPercentage; 
     56        } 
     57         
     58        public long getLength() { 
     59                long length = 0; 
     60                for(ExecutionPhase execPhase: resourceConsumptionList){ 
     61                        length = length + execPhase.getLenght(); 
     62                } 
     63                return length; 
     64        } 
    4665} 
Note: See TracChangeset for help on using the changeset viewer.