Ignore:
Timestamp:
06/26/14 14:18:01 (11 years ago)
Author:
wojtekp
Message:
 
Location:
DCWoRMS/branches/coolemall/src/schedframe/resources
Files:
2 added
1 deleted
16 edited
16 moved

Legend:

Unmodified
Added
Removed
  • DCWoRMS/branches/coolemall/src/schedframe/resources/CustomResourceType.java

    r477 r1396  
    22 
    33 
    4 public class UserResourceType implements ResourceType { 
     4public class CustomResourceType implements ResourceType { 
    55 
    66        protected String name; 
    77 
    8         public UserResourceType(String name) { 
     8        public CustomResourceType(String name) { 
    99                this.name = name; 
    1010        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/ResourceHistoryItem.java

    r1207 r1396  
    22 
    33 
    4 public class ResourceHistoryChanges { 
     4public class ResourceHistoryItem { 
    55         
    66        private long timestamp;  
    77        private String resourceName; 
    8         private String operation; 
     8        private String action; 
    99        private String paramter; 
    1010         
    11         public ResourceHistoryChanges(long timestamp, String resourceName, String operation, String paramter) { 
     11        public ResourceHistoryItem(long timestamp, String resourceName, String action, String paramter) { 
    1212                super(); 
    1313                this.timestamp = timestamp; 
    1414                this.resourceName = resourceName; 
    15                 this.operation = operation; 
     15                this.action = action; 
    1616                this.paramter = paramter; 
    1717        } 
     
    2525        } 
    2626         
    27         public String getOperation() { 
    28                 return operation; 
     27        public String getAction() { 
     28                return action; 
    2929        } 
    3030         
  • DCWoRMS/branches/coolemall/src/schedframe/resources/ResourceTypeFactory.java

    r1207 r1396  
    6060                        return StandardResourceType.LS; 
    6161                 
    62                 return new UserResourceType(typeName); 
     62                return new CustomResourceType(typeName); 
    6363        } 
    6464} 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/ComputingResource.java

    r1392 r1396  
    5757                initCharacteristics(resDesc); 
    5858                accept(new LoadExtension(resDesc.getLoadProfile(), this)); 
    59                 accept(new EnergyExtension.Builder().resource(this).powerProfile(resDesc.getPowerProfile()).airFlowProfile(resDesc.getAirThroughputProfile()).thermalProfile(resDesc.getThermalProfile()).build());      
     59                accept(new EnergyExtension.Builder().resource(this).powerProfile(resDesc.getPowerProfile()).airflowProfile(resDesc.getAirflowProfile()).thermalProfile(resDesc.getThermalProfile()).build());    
    6060        } 
    6161 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/EnergyExtension.java

    r1389 r1396  
    1010import schedframe.resources.computing.extensions.ExtensionException; 
    1111import schedframe.resources.computing.extensions.ExtensionType; 
    12 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputInterfaceFactory; 
    13 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputProfile; 
    14 import schedframe.resources.computing.profiles.energy.airthroughput.ui.AirThroughputInterface; 
     12import schedframe.resources.computing.profiles.energy.airthroughput.AirflowInterfaceFactory; 
     13import schedframe.resources.computing.profiles.energy.airthroughput.AirflowProfile; 
     14import schedframe.resources.computing.profiles.energy.airthroughput.ui.AirflowInterface; 
    1515import schedframe.resources.computing.profiles.energy.power.PowerInterfaceFactory; 
    1616import schedframe.resources.computing.profiles.energy.power.PowerProfile; 
     
    3030        protected PowerProfile powerProfile; 
    3131         
    32         protected AirThroughputInterface airFlowInterface; 
    33         protected AirThroughputProfile airFlowProfile; 
     32        protected AirflowInterface airflowInterface; 
     33        protected AirflowProfile airflowProfile; 
    3434         
    3535        protected ThermalInterface thermalInterface; 
     
    7474                protected PowerProfile powerProfile; 
    7575                 
    76                 protected AirThroughputInterface airFlowInterface; 
    77                 protected AirThroughputProfile airFlowProfile; 
     76                protected AirflowInterface airflowInterface; 
     77                protected AirflowProfile airflowProfile; 
    7878                 
    7979                protected ThermalInterface thermalInterface; 
     
    8484                public Builder powerProfile(PowerProfile pp){this.powerProfile = pp; this.powerInterface = PowerInterfaceFactory.createPowerInterface(resource, powerProfile); return this; } 
    8585 
    86         public Builder airFlowProfile(AirThroughputProfile atp){this.airFlowProfile = atp; this.airFlowInterface = AirThroughputInterfaceFactory.createAirThroughputInterface(resource, airFlowProfile); return this; } 
     86        public Builder airflowProfile(AirflowProfile atp){this.airflowProfile = atp; this.airflowInterface = AirflowInterfaceFactory.createAirflowInterface(resource, airflowProfile); return this; } 
    8787 
    8888        public Builder thermalProfile(ThermalProfile tp){this.thermalProfile = tp; this.thermalInterface = ThermalInterfaceFactory.createThermalInterface(resource, thermalProfile); return this; } 
     
    9898                this.powerProfile = builder.powerProfile; 
    9999                 
    100                 this.airFlowInterface = builder.airFlowInterface ; 
    101                 this.airFlowProfile = builder.airFlowProfile; 
     100                this.airflowInterface = builder.airflowInterface ; 
     101                this.airflowProfile = builder.airflowProfile; 
    102102                 
    103103                this.thermalInterface = builder.thermalInterface; 
     
    163163                                 
    164164                        case AIRFLOW_STATE_CHANGED: 
    165                                 double airFlow = powerProfile.getEnergyEstimationPlugin().estimateAirThroughput(enEvent, new JobRegistryImpl(resource.getFullName()), resource); 
    166                                 airFlowProfile.addToAirFlowHistory(airFlow); 
     165                                double airflow = powerProfile.getEnergyEstimationPlugin().estimateAirflow(enEvent, new JobRegistryImpl(resource.getFullName()), resource); 
     166                                airflowProfile.addToAirFlowHistory(airflow); 
    167167                                break; 
    168168                                 
     
    204204        } 
    205205 
    206         public AirThroughputInterface getAirThroughputInterface() { 
    207                 return airFlowInterface; 
    208         } 
    209  
    210         public AirThroughputProfile getAirFlowProfile() { 
    211                 return airFlowProfile; 
     206        public AirflowInterface getAirflowInterface() { 
     207                return airflowInterface; 
     208        } 
     209 
     210        public AirflowProfile getAirFlowProfile() { 
     211                return airflowProfile; 
    212212        } 
    213213         
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/AirFlowValue.java

    r495 r1396  
    33import schedframe.resources.computing.profiles.energy.MeasurementHistory; 
    44 
    5 public class AirFlowValue extends MeasurementHistory{ 
     5public class AirflowValue extends MeasurementHistory{ 
    66 
    7         public AirFlowValue(long timestamp, double value){ 
     7        public AirflowValue(long timestamp, double value){ 
    88                super(timestamp, value); 
    99        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/AirflowInterfaceFactory.java

    r1318 r1396  
    33import schedframe.resources.StandardResourceType; 
    44import schedframe.resources.computing.ComputingResource; 
    5 import schedframe.resources.computing.profiles.energy.airthroughput.ui.AirThroughputInterface; 
    6 import schedframe.resources.computing.profiles.energy.airthroughput.ui.ComputingResourceAirThroughputInterface; 
     5import schedframe.resources.computing.profiles.energy.airthroughput.ui.AirflowInterface; 
     6import schedframe.resources.computing.profiles.energy.airthroughput.ui.ComputingResourceAirflowInterface; 
    77import schedframe.resources.devices.PhysicalResource; 
    8 import schedframe.resources.devices.DeviceAirThroughputInterface; 
    9 import schedframe.resources.devices.coolemall.FanAirThroughputInterface; 
     8import schedframe.resources.devices.DeviceAirflowInterface; 
     9import schedframe.resources.devices.coolemall.FanAirflowInterface; 
    1010 
    11 public class AirThroughputInterfaceFactory { 
     11public class AirflowInterfaceFactory { 
    1212         
    13         public static AirThroughputInterface createAirThroughputInterface(PhysicalResource resource, AirThroughputProfile atp){ 
     13        public static AirflowInterface createAirflowInterface(PhysicalResource resource, AirflowProfile atp){ 
    1414                if(atp == null) 
    1515                        return null; 
    16                 AirThroughputInterface airThroughputInterface = null; 
     16                AirflowInterface airflowInterface = null; 
    1717                if(resource.getType().getName().equals(StandardResourceType.CRAH.getName())) 
    18                         airThroughputInterface = new DeviceAirThroughputInterface(resource, atp); 
     18                        airflowInterface = new DeviceAirflowInterface(resource, atp); 
    1919                else if(resource.getType().getName().equals(StandardResourceType.Fan.getName())) 
    20                         airThroughputInterface = new FanAirThroughputInterface(resource, atp); 
     20                        airflowInterface = new FanAirflowInterface(resource, atp); 
    2121                else if(resource.getType().getName().equals(StandardResourceType.Inlet.getName())) 
    22                         airThroughputInterface = new FanAirThroughputInterface(resource, atp); 
     22                        airflowInterface = new FanAirflowInterface(resource, atp); 
    2323                else if(resource.getType().getName().equals(StandardResourceType.Outlet.getName())) 
    24                         airThroughputInterface = new FanAirThroughputInterface(resource, atp); 
     24                        airflowInterface = new FanAirflowInterface(resource, atp); 
    2525                else if(resource.getType().getName().equals(StandardResourceType.CoolingDevice.getName())) 
    26                         airThroughputInterface = new DeviceAirThroughputInterface(resource, atp); 
     26                        airflowInterface = new DeviceAirflowInterface(resource, atp); 
    2727                else 
    28                         airThroughputInterface = new ComputingResourceAirThroughputInterface((ComputingResource)resource, atp); 
    29                 return airThroughputInterface; 
     28                        airflowInterface = new ComputingResourceAirflowInterface((ComputingResource)resource, atp); 
     29                return airflowInterface; 
    3030        } 
    3131} 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/AirflowProfile.java

    r1207 r1396  
    77 
    88import schedframe.Parameters; 
    9 import schedframe.resources.computing.profiles.energy.airthroughput.plugin.AirThroughputEstimationPlugin; 
     9import schedframe.resources.computing.profiles.energy.airthroughput.plugin.AirflowEstimationPlugin; 
    1010 
    11 public class AirThroughputProfile { 
     11public class AirflowProfile { 
    1212         
    13         protected List<AirFlowValue> airFlowHistory; 
     13        protected List<AirflowValue> airflowHistory; 
    1414         
    15         protected AirThroughputEstimationPlugin airThroughputEstimationPlugin; 
    16         protected List <AirThroughputState> airThroughputStates; 
     15        protected AirflowEstimationPlugin airflowEstimationPlugin; 
     16        protected List <AirflowState> airflowStates; 
    1717        protected Parameters parameters; 
    1818 
    19         public AirThroughputProfile(AirThroughputEstimationPlugin airThroughputEstimationPlugin, List<AirThroughputState> airThroughputStates) { 
     19        public AirflowProfile(AirflowEstimationPlugin airflowEstimationPlugin, List<AirflowState> airflowStates) { 
    2020                super(); 
    21                 this.airThroughputEstimationPlugin = airThroughputEstimationPlugin; 
    22                 this.airThroughputStates = airThroughputStates; 
    23                 this.airFlowHistory = new ArrayList<AirFlowValue>(); 
     21                this.airflowEstimationPlugin = airflowEstimationPlugin; 
     22                this.airflowStates = airflowStates; 
     23                this.airflowHistory = new ArrayList<AirflowValue>(); 
    2424        } 
    2525 
    26         public List<AirThroughputState> getAirThroughputStates() { 
    27                 return airThroughputStates; 
     26        public List<AirflowState> getAirflowStates() { 
     27                return airflowStates; 
    2828        } 
    2929         
    30         public void addToAirFlowHistory(double airFlow) { 
     30        public void addToAirFlowHistory(double airflow) { 
    3131 
    32                 if (airFlowHistory.size() == 0) { 
    33                         AirFlowValue usage = new AirFlowValue(DateTimeUtils.currentTimeMillis(), airFlow); 
    34                         airFlowHistory.add(usage); 
     32                if (airflowHistory.size() == 0) { 
     33                        AirflowValue usage = new AirflowValue(DateTimeUtils.currentTimeMillis(), airflow); 
     34                        airflowHistory.add(usage); 
    3535                        return; 
    3636                } 
    3737 
    38                 int lastIdx = airFlowHistory.size() - 1; 
    39                 double lastAirFlow = airFlowHistory.get(lastIdx).getValue(); 
    40                 if (lastAirFlow != airFlow) { 
    41                         AirFlowValue usage = airFlowHistory.get(lastIdx); 
     38                int lastIdx = airflowHistory.size() - 1; 
     39                double lastAirflow = airflowHistory.get(lastIdx).getValue(); 
     40                if (lastAirflow != airflow) { 
     41                        AirflowValue usage = airflowHistory.get(lastIdx); 
    4242                        long currentTime = DateTimeUtils.currentTimeMillis(); 
    4343                        if (usage.getTimestamp() == currentTime) { 
    44                                 usage.setValue(airFlow); 
    45                                 if(lastIdx > 0 && airFlowHistory.get(lastIdx - 1).getValue() == airFlow) 
    46                                         airFlowHistory.remove(usage); 
     44                                usage.setValue(airflow); 
     45                                if(lastIdx > 0 && airflowHistory.get(lastIdx - 1).getValue() == airflow) 
     46                                        airflowHistory.remove(usage); 
    4747                        } else { 
    48                                 usage = new AirFlowValue(DateTimeUtils.currentTimeMillis(), airFlow); 
    49                                 airFlowHistory.add(usage); 
     48                                usage = new AirflowValue(DateTimeUtils.currentTimeMillis(), airflow); 
     49                                airflowHistory.add(usage); 
    5050                        } 
    5151                } 
    5252        } 
    5353 
    54         public List<AirFlowValue> getAirThroughputHistory() { 
    55                 return airFlowHistory; 
     54        public List<AirflowValue> getAirflowHistory() { 
     55                return airflowHistory; 
    5656        } 
    5757         
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/AirflowState.java

    r477 r1396  
    33import schedframe.Parameters; 
    44 
    5 public class AirThroughputState { 
     5public class AirflowState { 
    66 
    7         protected String name; 
     7        protected AirflowStateName name; 
    88        protected double value; 
    99        protected double powerUsage; 
    1010         
    11         public AirThroughputState(String name, double value, double powerUsage) { 
     11        public AirflowState(AirflowStateName name, double value, double powerUsage) { 
    1212                super(); 
    1313                this.name = name; 
     
    1616        } 
    1717         
    18         public String getName() { 
     18        public AirflowStateName getName() { 
    1919                return name; 
    2020        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/AirflowStateName.java

    r753 r1396  
    11package schedframe.resources.computing.profiles.energy.airthroughput; 
    22 
    3 public interface AirThroughputStateName { 
     3public interface AirflowStateName { 
    44 
    5         public String getName(); 
     5        public String getLabel(); 
    66 
    77} 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/CustomAirflowStateName.java

    r753 r1396  
    22 
    33 
    4 public class UserAirThroughputStateName implements AirThroughputStateName{ 
     4public class CustomAirflowStateName implements AirflowStateName{ 
    55 
    66        protected String name; 
    77 
    8         public UserAirThroughputStateName(String name) { 
     8        public CustomAirflowStateName(String name) { 
    99                this.name = name; 
    1010        } 
    1111 
    12         public String getName() { 
     12        public String getLabel() { 
    1313                return name; 
    1414        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/StandardAirflowStateName.java

    r1207 r1396  
    11package schedframe.resources.computing.profiles.energy.airthroughput; 
    22 
    3 public enum  StandardAirThroughputStateName implements AirThroughputStateName{ 
     3public enum  StandardAirflowStateName implements AirflowStateName{ 
    44 
    55        ON, 
    66        OFF; 
    77 
    8         public String getName() { 
     8        public String getLabel() { 
    99                return toString(); 
    1010        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/plugin/AirflowEstimationPlugin.java

    r748 r1396  
    66import schedframe.scheduling.manager.tasks.JobRegistry; 
    77 
    8 public interface AirThroughputEstimationPlugin extends Plugin { 
     8public interface AirflowEstimationPlugin extends Plugin { 
    99         
    10         public double estimateAirThroughput(Event event, JobRegistry jobRegistry, ComputingResource resource); 
     10        public double estimateAirflow(Event event, JobRegistry jobRegistry, ComputingResource resource); 
    1111} 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/plugin/DefaultAirflowEstimationPlugin.java

    r770 r1396  
    77import schedframe.scheduling.manager.tasks.JobRegistry; 
    88 
    9 public class DefaultAirThroughputEstimationPlugin implements AirThroughputEstimationPlugin { 
     9public class DefaultAirflowEstimationPlugin implements AirflowEstimationPlugin { 
    1010 
    1111        @Override 
     
    2828 
    2929        @Override 
    30         public double estimateAirThroughput(Event event, JobRegistry jobRegistry, ComputingResource resource) { 
     30        public double estimateAirflow(Event event, JobRegistry jobRegistry, ComputingResource resource) { 
    3131                throw new RuntimeException("This interface is depracated. For air throughput estimation please use the estimateAirThroughput method form EnergyEstimationPlugin interface."); 
    3232        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/ui/AirflowInterface.java

    r1380 r1396  
    44 
    55import schedframe.Parameters; 
    6 import schedframe.resources.computing.profiles.energy.airthroughput.AirFlowValue; 
    7 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputState; 
    8 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputStateName; 
     6import schedframe.resources.computing.profiles.energy.airthroughput.AirflowValue; 
     7import schedframe.resources.computing.profiles.energy.airthroughput.AirflowState; 
     8import schedframe.resources.computing.profiles.energy.airthroughput.AirflowStateName; 
    99 
    10 public interface AirThroughputInterface { 
     10public interface AirflowInterface { 
    1111         
    12         public AirThroughputStateName getAirThroughputState(); 
     12        public AirflowStateName getAirflowState(); 
    1313         
    14         public boolean setAirThroughputState(AirThroughputStateName airThroughputState); 
     14        public boolean setAirflowState(AirflowStateName airflowState); 
    1515         
    16         public boolean supportAirThroughputState(AirThroughputStateName powerState); 
     16        public boolean supportAirflowState(AirflowStateName powerState); 
    1717         
    18         public List<AirThroughputState> getSupportedAirThroughputStates(); 
     18        public List<AirflowState> getSupportedAirflowStates(); 
    1919         
    20         public double getAirFlow(AirThroughputStateName state) throws NoSuchFieldException; 
     20        public double getAirflow(AirflowStateName state) throws NoSuchFieldException; 
    2121         
    22         public double getPowerConsumption(AirThroughputStateName state) throws NoSuchFieldException; 
     22        public double getPowerConsumption(AirflowStateName state) throws NoSuchFieldException; 
    2323         
    24         public AirFlowValue getRecentAirFlow(); 
     24        public AirflowValue getRecentAirflow(); 
    2525         
    26         List<AirFlowValue> getAirFlowHistory(); 
     26        List<AirflowValue> getAirflowHistory(); 
    2727         
    2828        public Parameters getParameters(); 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/ui/ComputingResourceAirflowInterface.java

    r1380 r1396  
    1010import schedframe.resources.computing.profiles.energy.EnergyEvent; 
    1111import schedframe.resources.computing.profiles.energy.EnergyEventType; 
    12 import schedframe.resources.computing.profiles.energy.airthroughput.AirFlowValue; 
    13 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputProfile; 
    14 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputState; 
    15 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputStateName; 
    16 import schedframe.resources.computing.profiles.energy.airthroughput.StandardAirThroughputStateName; 
     12import schedframe.resources.computing.profiles.energy.airthroughput.AirflowValue; 
     13import schedframe.resources.computing.profiles.energy.airthroughput.AirflowProfile; 
     14import schedframe.resources.computing.profiles.energy.airthroughput.AirflowState; 
     15import schedframe.resources.computing.profiles.energy.airthroughput.AirflowStateName; 
     16import schedframe.resources.computing.profiles.energy.airthroughput.StandardAirflowStateName; 
    1717 
    18 public class ComputingResourceAirThroughputInterface implements AirThroughputInterface{ 
     18public class ComputingResourceAirflowInterface implements AirflowInterface{ 
    1919 
    20         protected AirThroughputStateName currentAirThroughputState; 
    21         protected AirThroughputProfile airThroughputProfile; 
     20        protected AirflowStateName currentAirflowState; 
     21        protected AirflowProfile airflowProfile; 
    2222        protected ComputingResource resource; 
    2323         
    24         public ComputingResourceAirThroughputInterface(ComputingResource resource, AirThroughputProfile airThroughputProfile){ 
     24        public ComputingResourceAirflowInterface(ComputingResource resource, AirflowProfile airflowProfile){ 
    2525                this.resource = resource; 
    26                 this.airThroughputProfile = airThroughputProfile; 
    27                 this.currentAirThroughputState = StandardAirThroughputStateName.ON; 
     26                this.airflowProfile = airflowProfile; 
     27                this.currentAirflowState = StandardAirflowStateName.ON; 
    2828        } 
    2929         
    30         public AirThroughputStateName getAirThroughputState() { 
    31                 return currentAirThroughputState; 
     30        public AirflowStateName getAirflowState() { 
     31                return currentAirflowState; 
    3232        } 
    3333 
    34         public boolean setAirThroughputState(AirThroughputStateName state) { 
    35                 if(supportAirThroughputState(state)){ 
    36                         currentAirThroughputState = state; 
     34        public boolean setAirflowState(AirflowStateName state) { 
     35                if(supportAirflowState(state)){ 
     36                        currentAirflowState = state; 
    3737                         
    3838                        //TO DO - notifications should be called for all resources starting form the lowest layer 
     
    4444        } 
    4545 
    46         public boolean supportAirThroughputState(AirThroughputStateName state) { 
    47                 for(AirThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){ 
    48                         if(airFlowState.getName().equals(state.getName())){ 
     46        public boolean supportAirflowState(AirflowStateName state) { 
     47                for(AirflowState airflowState: airflowProfile.getAirflowStates()){ 
     48                        if(airflowState.getName().equals(state.getLabel())){ 
    4949                                return true; 
    5050                        } 
     
    5353        } 
    5454 
    55         public List<AirThroughputState> getSupportedAirThroughputStates() { 
    56                 List<AirThroughputState> airThroughputStates = new ArrayList<AirThroughputState>(); 
    57                 for(AirThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){ 
    58                         airThroughputStates.add(airFlowState); 
     55        public List<AirflowState> getSupportedAirflowStates() { 
     56                List<AirflowState> airflowStates = new ArrayList<AirflowState>(); 
     57                for(AirflowState airflowState: airflowProfile.getAirflowStates()){ 
     58                        airflowStates.add(airflowState); 
    5959                } 
    60                 return airThroughputStates; 
     60                return airflowStates; 
    6161        } 
    6262 
    63         public double getAirFlow(AirThroughputStateName state) throws NoSuchFieldException { 
    64                 double airThroughput = 0; 
    65                 if(supportAirThroughputState(state)){ 
    66                         for(AirThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){ 
    67                                 if(airFlowState.getName().equals(state.getName())){ 
    68                                         airThroughput = airFlowState.getValue(); 
     63        public double getAirflow(AirflowStateName state) throws NoSuchFieldException { 
     64                double airflow = 0; 
     65                if(supportAirflowState(state)){ 
     66                        for(AirflowState airflowState: airflowProfile.getAirflowStates()){ 
     67                                if(airflowState.getName().equals(state.getLabel())){ 
     68                                        airflow = airflowState.getValue(); 
    6969                                        break; 
    7070                                } 
    7171                        } 
    7272                } 
    73                 return airThroughput; 
     73                return airflow; 
    7474        } 
    7575 
    76         public double getPowerConsumption(AirThroughputStateName state) throws NoSuchFieldException { 
     76        public double getPowerConsumption(AirflowStateName state) throws NoSuchFieldException { 
    7777                double powerConsumption = 0; 
    78                 if(supportAirThroughputState(state)){ 
    79                         for(AirThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){ 
    80                                 if(airFlowState.getName().equals(state.getName())){ 
    81                                         powerConsumption = airFlowState.getPowerUsage(); 
     78                if(supportAirflowState(state)){ 
     79                        for(AirflowState airflowState: airflowProfile.getAirflowStates()){ 
     80                                if(airflowState.getName().equals(state.getLabel())){ 
     81                                        powerConsumption = airflowState.getPowerUsage(); 
    8282                                        break; 
    8383                                } 
     
    8787        } 
    8888         
    89         public AirFlowValue getRecentAirFlow() { 
    90                 AirFlowValue airFlow = null; 
    91                 int lastIdx = getAirFlowHistory().size() - 1; 
     89        public AirflowValue getRecentAirflow() { 
     90                AirflowValue airflow = null; 
     91                int lastIdx = getAirflowHistory().size() - 1; 
    9292                if(lastIdx >= 0) 
    93                         airFlow = getAirFlowHistory().get(lastIdx); 
     93                        airflow = getAirflowHistory().get(lastIdx); 
    9494                else {   
    9595                        try { 
    96                                 airFlow = new AirFlowValue(DateTimeUtils.currentTimeMillis(), getAirFlow(currentAirThroughputState)); 
     96                                airflow = new AirflowValue(DateTimeUtils.currentTimeMillis(), getAirflow(currentAirflowState)); 
    9797                        } catch (NoSuchFieldException e) { 
    9898                        } 
    9999                } 
    100                 return airFlow; 
     100                return airflow; 
    101101        } 
    102102         
    103         public List<AirFlowValue> getAirFlowHistory(){ 
    104                 return airThroughputProfile.getAirThroughputHistory(); 
     103        public List<AirflowValue> getAirflowHistory(){ 
     104                return airflowProfile.getAirflowHistory(); 
    105105        } 
    106106         
    107107         
    108108        public Parameters getParameters() { 
    109                 return airThroughputProfile.getParameters(); 
     109                return airflowProfile.getParameters(); 
    110110        } 
    111111 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/CustomPowerStateName.java

    r477 r1396  
    11package schedframe.resources.computing.profiles.energy.power; 
    22 
    3 public class UserPowerStateName implements PowerStateName { 
     3public class CustomPowerStateName implements PowerStateName { 
    44 
    55        protected String name; 
    66 
    7         public UserPowerStateName(String name) { 
     7        public CustomPowerStateName(String name) { 
    88                this.name = name; 
    99        } 
    1010 
    11         public String getName() { 
     11        public String getLabel() { 
    1212                return name; 
    1313        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/PowerStateName.java

    r477 r1396  
    33public interface PowerStateName { 
    44         
    5         public String getName(); 
     5        public String getLabel(); 
    66 
    77} 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/PowerStateNameFactory.java

    r477 r1396  
    66        public static PowerStateName createPowerStateName (String powerStateName){ 
    77                 
    8                 if(powerStateName.equals(StandardPowerStateName.ON.getName())) 
     8                if(powerStateName.equals(StandardPowerStateName.ON.getLabel())) 
    99                        return StandardPowerStateName.ON; 
    1010                 
    11                 else if(powerStateName.equals(StandardPowerStateName.OFF.getName())) 
     11                else if(powerStateName.equals(StandardPowerStateName.OFF.getLabel())) 
    1212                        return StandardPowerStateName.OFF; 
    1313                 
    14                 else if(powerStateName.equals(StandardPowerStateName.HIBERNATE.getName())) 
     14                else if(powerStateName.equals(StandardPowerStateName.HIBERNATE.getLabel())) 
    1515                        return StandardPowerStateName.HIBERNATE; 
    1616                 
    17                 else if(powerStateName.equals(StandardPowerStateName.SLEEP.getName())) 
     17                else if(powerStateName.equals(StandardPowerStateName.SLEEP.getLabel())) 
    1818                        return StandardPowerStateName.SLEEP; 
    1919                 
    20                 else if(powerStateName.equals(StandardPowerStateName.SUSPEND.getName())) 
     20                else if(powerStateName.equals(StandardPowerStateName.SUSPEND.getLabel())) 
    2121                        return StandardPowerStateName.SUSPEND; 
    2222                 
    23                 else return new UserPowerStateName(powerStateName); 
     23                else return new CustomPowerStateName(powerStateName); 
    2424        } 
    2525} 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/StandardPowerStateName.java

    r477 r1396  
    1010        HIBERNATE; 
    1111 
    12         public String getName() { 
     12        public String getLabel() { 
    1313                return toString(); 
    1414        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/plugin/EnergyEstimationPlugin.java

    r1207 r1396  
    1010        public double estimatePowerConsumption(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource); 
    1111 
    12         public double estimateAirThroughput(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource); 
     12        public double estimateAirflow(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource); 
    1313 
    1414        public double estimateTemperature(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource); 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/ui/ComputingResourcePowerInterface.java

    r1374 r1396  
    7474        public boolean supportPowerState(PowerStateName state) { 
    7575                for(PowerState powerState: powerProfile.getSupportedPowerStates()){ 
    76                         if(powerState.getName().getName().equals(state.getName())){ 
     76                        if(powerState.getName().getLabel().equals(state.getLabel())){ 
    7777                                return true; 
    7878                        } 
     
    8686                if(supportPowerState(state)){ 
    8787                        for(PowerState powerState: powerProfile.getSupportedPowerStates()){ 
    88                                 if(powerState.getName().getName().equals(state.getName())){ 
     88                                if(powerState.getName().getLabel().equals(state.getLabel())){ 
    8989                                        powerConsumption = powerState.getPowerUsage(); 
    9090                                        break; 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/devices/Device.java

    r1207 r1396  
    2525                this.extensionList = new ExtensionListImpl(1); 
    2626                initCharacteristics(devDesc); 
    27                 accept(new EnergyExtension.Builder().resource(this).powerProfile(devDesc.getPowerProfile()).airFlowProfile(devDesc.getAirThroughputProfile()).thermalProfile(devDesc.getThermalProfile()).build());      
     27                accept(new EnergyExtension.Builder().resource(this).powerProfile(devDesc.getPowerProfile()).airflowProfile(devDesc.getAirflowProfile()).thermalProfile(devDesc.getThermalProfile()).build());    
    2828        } 
    2929 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/devices/DeviceAirflowInterface.java

    r1380 r1396  
    99import schedframe.resources.computing.profiles.energy.EnergyEvent; 
    1010import schedframe.resources.computing.profiles.energy.EnergyEventType; 
    11 import schedframe.resources.computing.profiles.energy.airthroughput.AirFlowValue; 
    12 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputProfile; 
    13 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputState; 
    14 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputStateName; 
    15 import schedframe.resources.computing.profiles.energy.airthroughput.StandardAirThroughputStateName; 
    16 import schedframe.resources.computing.profiles.energy.airthroughput.ui.AirThroughputInterface; 
     11import schedframe.resources.computing.profiles.energy.airthroughput.AirflowValue; 
     12import schedframe.resources.computing.profiles.energy.airthroughput.AirflowProfile; 
     13import schedframe.resources.computing.profiles.energy.airthroughput.AirflowState; 
     14import schedframe.resources.computing.profiles.energy.airthroughput.AirflowStateName; 
     15import schedframe.resources.computing.profiles.energy.airthroughput.StandardAirflowStateName; 
     16import schedframe.resources.computing.profiles.energy.airthroughput.ui.AirflowInterface; 
    1717 
    18 public class DeviceAirThroughputInterface implements AirThroughputInterface{ 
     18public class DeviceAirflowInterface implements AirflowInterface{ 
    1919 
    20         protected AirThroughputStateName currentAirThroughputState; 
    21         protected AirThroughputProfile airThroughputProfile; 
     20        protected AirflowStateName currentAirflowState; 
     21        protected AirflowProfile airflowProfile; 
    2222        protected PhysicalResource resource; 
    2323         
    24         public DeviceAirThroughputInterface(PhysicalResource resource, AirThroughputProfile airThroughputProfile){ 
     24        public DeviceAirflowInterface(PhysicalResource resource, AirflowProfile airflowProfile){ 
    2525                this.resource = resource; 
    26                 this.airThroughputProfile = airThroughputProfile; 
    27                 this.currentAirThroughputState = StandardAirThroughputStateName.ON; 
     26                this.airflowProfile = airflowProfile; 
     27                this.currentAirflowState = StandardAirflowStateName.ON; 
    2828        } 
    2929         
    30         public AirThroughputStateName getAirThroughputState() { 
    31                 return currentAirThroughputState; 
     30        public AirflowStateName getAirflowState() { 
     31                return currentAirflowState; 
    3232        } 
    3333 
    34         public boolean setAirThroughputState(AirThroughputStateName state) { 
    35                 if(supportAirThroughputState(state)){ 
    36                         currentAirThroughputState = state; 
     34        public boolean setAirflowState(AirflowStateName state) { 
     35                if(supportAirflowState(state)){ 
     36                        currentAirflowState = state; 
    3737                         
    3838                        //TO DO - notifications should be called for all resources starting form the lowest layer 
     
    4444        } 
    4545 
    46         public boolean supportAirThroughputState(AirThroughputStateName state) { 
    47                 for(AirThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){ 
    48                         if(airFlowState.getName().equals(state.getName())){ 
     46        public boolean supportAirflowState(AirflowStateName state) { 
     47                for(AirflowState airflowState: airflowProfile.getAirflowStates()){ 
     48                        if(airflowState.getName().getLabel().equals(state.getLabel())){ 
    4949                                return true; 
    5050                        } 
     
    5353        } 
    5454 
    55         public List<AirThroughputState> getSupportedAirThroughputStates(){ 
    56                 List<AirThroughputState> airThroughputStates = new ArrayList<AirThroughputState>(); 
    57                 for(AirThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){ 
    58                         airThroughputStates.add(airFlowState); 
     55        public List<AirflowState> getSupportedAirflowStates(){ 
     56                List<AirflowState> airflowStates = new ArrayList<AirflowState>(); 
     57                for(AirflowState airFlowState: airflowProfile.getAirflowStates()){ 
     58                        airflowStates.add(airFlowState); 
    5959                } 
    60                 return airThroughputStates; 
     60                return airflowStates; 
    6161        } 
    6262 
    63         public double getAirFlow(AirThroughputStateName state) throws NoSuchFieldException { 
    64                 double airThroughput = 0; 
    65                 if(supportAirThroughputState(state)){ 
    66                         for(AirThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){ 
    67                                 if(airFlowState.getName().equals(state.getName())){ 
    68                                         airThroughput = airFlowState.getValue(); 
     63        public double getAirflow(AirflowStateName state) throws NoSuchFieldException { 
     64                double airflow = 0; 
     65                if(supportAirflowState(state)){ 
     66                        for(AirflowState airflowState: airflowProfile.getAirflowStates()){ 
     67                                if(airflowState.getName().getLabel().equals(state.getLabel())){ 
     68                                        airflow = airflowState.getValue(); 
    6969                                        break; 
    7070                                } 
    7171                        } 
    7272                } 
    73                 return airThroughput; 
     73                return airflow; 
    7474        } 
    7575 
    76         public double getPowerConsumption(AirThroughputStateName state) throws NoSuchFieldException { 
     76        public double getPowerConsumption(AirflowStateName state) throws NoSuchFieldException { 
    7777                double powerConsumption = 0; 
    78                 if(supportAirThroughputState(state)){ 
    79                         for(AirThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){ 
    80                                 if(airFlowState.getName().equals(state.getName())){ 
    81                                         powerConsumption = airFlowState.getPowerUsage(); 
     78                if(supportAirflowState(state)){ 
     79                        for(AirflowState airflowState: airflowProfile.getAirflowStates()){ 
     80                                if(airflowState.getName().getLabel().equals(state.getLabel())){ 
     81                                        powerConsumption = airflowState.getPowerUsage(); 
    8282                                        break; 
    8383                                } 
     
    8787        } 
    8888         
    89         public AirFlowValue getRecentAirFlow() { 
    90                 AirFlowValue airFlow = null; 
    91                 int lastIdx = getAirFlowHistory().size() - 1; 
     89        public AirflowValue getRecentAirflow() { 
     90                AirflowValue airflow = null; 
     91                int lastIdx = getAirflowHistory().size() - 1; 
    9292                if(lastIdx >= 0) 
    93                         airFlow = getAirFlowHistory().get(lastIdx); 
     93                        airflow = getAirflowHistory().get(lastIdx); 
    9494                else {   
    9595                        try { 
    96                                 airFlow = new AirFlowValue(DateTimeUtils.currentTimeMillis(), getAirFlow(currentAirThroughputState)); 
     96                                airflow = new AirflowValue(DateTimeUtils.currentTimeMillis(), getAirflow(currentAirflowState)); 
    9797                        } catch (NoSuchFieldException e) { 
    9898                        } 
    9999                } 
    100                 return airFlow; 
     100                return airflow; 
    101101        } 
    102102         
    103         public List<AirFlowValue> getAirFlowHistory(){ 
    104                 return airThroughputProfile.getAirThroughputHistory(); 
     103        public List<AirflowValue> getAirflowHistory(){ 
     104                return airflowProfile.getAirflowHistory(); 
    105105        } 
    106106         
    107107        public Parameters getParameters() { 
    108                 return airThroughputProfile.getParameters(); 
     108                return airflowProfile.getParameters(); 
    109109        } 
    110110 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/devices/PhysicalResource.java

    r1287 r1396  
    1212import schedframe.resources.computing.extensions.ExtensionType; 
    1313import schedframe.resources.computing.profiles.energy.EnergyExtension; 
    14 import schedframe.resources.computing.profiles.energy.airthroughput.ui.AirThroughputInterface; 
     14import schedframe.resources.computing.profiles.energy.airthroughput.ui.AirflowInterface; 
    1515import schedframe.resources.computing.profiles.energy.power.ui.PowerInterface; 
    1616import schedframe.resources.computing.profiles.energy.thermal.ui.ThermalInterface; 
     
    7070        } 
    7171         
    72         public AirThroughputInterface getAirThroughputInterface(){ 
     72        public AirflowInterface getAirflowInterface(){ 
    7373                Extension extension = getExtension(ExtensionType.ENERGY_EXTENSION); 
    7474                if(extension != null){ 
    7575                        EnergyExtension ee = (EnergyExtension)extension; 
    76                         return ee.getAirThroughputInterface(); 
     76                        return ee.getAirflowInterface(); 
    7777                } 
    7878                return null; 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/devices/coolemall/FanAirflowInterface.java

    r1317 r1396  
    11package schedframe.resources.devices.coolemall; 
    22 
    3 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputProfile; 
    4 import schedframe.resources.computing.profiles.energy.airthroughput.UserAirThroughputStateName; 
     3import schedframe.resources.computing.profiles.energy.airthroughput.AirflowProfile; 
     4import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName; 
    55import schedframe.resources.devices.PhysicalResource; 
    6 import schedframe.resources.devices.DeviceAirThroughputInterface; 
     6import schedframe.resources.devices.DeviceAirflowInterface; 
    77 
    8 public class FanAirThroughputInterface extends DeviceAirThroughputInterface { 
     8public class FanAirflowInterface extends DeviceAirflowInterface { 
    99 
    10         public FanAirThroughputInterface(PhysicalResource resource, AirThroughputProfile airThroughputProfile) { 
    11                 super(resource, airThroughputProfile); 
    12                 this.currentAirThroughputState = new UserAirThroughputStateName("2"); 
     10        public FanAirflowInterface(PhysicalResource resource, AirflowProfile airflowProfile) { 
     11                super(resource, airflowProfile); 
     12                this.currentAirflowState = new CustomAirflowStateName("2"); 
    1313        } 
    1414         
    1515        public boolean turnOn(){ 
    16                 return setAirThroughputState(new UserAirThroughputStateName("2")); 
     16                return setAirflowState(new CustomAirflowStateName("2")); 
    1717        } 
    1818 
    1919        public boolean turnOff(){ 
    20                 return setAirThroughputState(new UserAirThroughputStateName("1")); 
     20                return setAirflowState(new CustomAirflowStateName("1")); 
    2121        } 
    2222} 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/devices/description/PhysicalResourceDescription.java

    r1317 r1396  
    1010import schedframe.resources.computing.description.ResourceDescription; 
    1111import schedframe.resources.computing.location.Location; 
    12 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputProfile; 
    13 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputState; 
    14 import schedframe.resources.computing.profiles.energy.airthroughput.plugin.AirThroughputEstimationPlugin; 
    15 import schedframe.resources.computing.profiles.energy.airthroughput.plugin.DefaultAirThroughputEstimationPlugin; 
     12import schedframe.resources.computing.profiles.energy.airthroughput.AirflowStateNameFactory; 
     13import schedframe.resources.computing.profiles.energy.airthroughput.AirflowProfile; 
     14import schedframe.resources.computing.profiles.energy.airthroughput.AirflowState; 
     15import schedframe.resources.computing.profiles.energy.airthroughput.plugin.AirflowEstimationPlugin; 
     16import schedframe.resources.computing.profiles.energy.airthroughput.plugin.DefaultAirflowEstimationPlugin; 
    1617import schedframe.resources.computing.profiles.energy.power.PState; 
    1718import schedframe.resources.computing.profiles.energy.power.PowerProfile; 
     
    3637 
    3738        protected PowerProfile powerProfile; 
    38         protected AirThroughputProfile airThroughputProfile; 
     39        protected AirflowProfile airflowProfile; 
    3940        protected ThermalProfile thermalProfile; 
    4041        protected LoadProfile loadProfile; 
     
    5859                if (profile != null) { 
    5960                        initPowerProfile(profile.getPowerProfile()); 
    60                         initAirThroughputProfile(profile.getAirThroughputProfile()); 
     61                        initAirflowProfile(profile.getAirThroughputProfile()); 
    6162                        initThermalProfile(profile.getThermalProfile()); 
    6263                        initLoadProfile(profile.getLoadProfile()); 
     
    151152        } 
    152153 
    153         protected void initAirThroughputProfile(schemas.AirThroughputProfile airThroughputProfile) { 
    154                 if (airThroughputProfile != null) { 
    155                          
    156                         AirThroughputEstimationPlugin airThroughputEstimationPlugin = null; 
    157                         List<AirThroughputState> airThroughputStates = null; 
    158                         if(airThroughputProfile.getAirThroughputEstimationPlugin() != null){ 
    159                                 String airThroughputEstimationPluginName = airThroughputProfile.getAirThroughputEstimationPlugin().getName(); 
    160                                 if(airThroughputEstimationPluginName != null) { 
    161                                         airThroughputEstimationPlugin = (AirThroughputEstimationPlugin) InstanceFactory.createInstance( 
    162                                                         airThroughputEstimationPluginName, AirThroughputEstimationPlugin.class);                         
     154        protected void initAirflowProfile(schemas.AirThroughputProfile airflowProfile) { 
     155                if (airflowProfile != null) { 
     156                         
     157                        AirflowEstimationPlugin airflowEstimationPlugin = null; 
     158                        List<AirflowState> airflowStates = null; 
     159                        if(airflowProfile.getAirThroughputEstimationPlugin() != null){ 
     160                                String airflowEstimationPluginName = airflowProfile.getAirThroughputEstimationPlugin().getName(); 
     161                                if(airflowEstimationPluginName != null) { 
     162                                        airflowEstimationPlugin = (AirflowEstimationPlugin) InstanceFactory.createInstance( 
     163                                                        airflowEstimationPluginName, AirflowEstimationPlugin.class);                     
    163164                                } else { 
    164                                         airThroughputEstimationPlugin = new DefaultAirThroughputEstimationPlugin(); 
    165                                 } 
    166                                 Parameters params = extractParameters(airThroughputProfile.getAirThroughputEstimationPlugin().getParameter()); 
    167                                 airThroughputEstimationPlugin.init(params); 
    168                         } 
    169                         if(airThroughputProfile.getAirThroughputStates() != null){ 
    170                                 airThroughputStates = new ArrayList<AirThroughputState>(); 
    171                                 int airThrouhputStateCount = airThroughputProfile.getAirThroughputStates().getAirThroughputStateCount(); 
    172                                 for (int i = 0; i < airThrouhputStateCount; i++) { 
    173                                         schemas.AirThroughputState ats = airThroughputProfile.getAirThroughputStates().getAirThroughputState(i); 
    174                                         AirThroughputState airThroughputState = new AirThroughputState(ats.getName(), ats.getValue() 
     165                                        airflowEstimationPlugin = new DefaultAirflowEstimationPlugin(); 
     166                                } 
     167                                Parameters params = extractParameters(airflowProfile.getAirThroughputEstimationPlugin().getParameter()); 
     168                                airflowEstimationPlugin.init(params); 
     169                        } 
     170                        if(airflowProfile.getAirThroughputStates() != null){ 
     171                                airflowStates = new ArrayList<AirflowState>(); 
     172                                int airflowStateCount = airflowProfile.getAirThroughputStates().getAirThroughputStateCount(); 
     173                                for (int i = 0; i < airflowStateCount; i++) { 
     174                                        schemas.AirThroughputState ats = airflowProfile.getAirThroughputStates().getAirThroughputState(i); 
     175                                        AirflowState airflowState = new AirflowState(AirflowStateNameFactory.createAirflowStateName(ats.getName()), ats.getValue() 
    175176                                                        .getContent(), ats.getPowerUsage().getContent()); 
    176177                                        Parameters params = extractParameters(ats.getParameter()); 
    177                                         airThroughputState.init(params); 
    178                                         airThroughputStates.add(airThroughputState); 
    179                                 } 
    180                         } 
    181                         this.airThroughputProfile = new AirThroughputProfile(airThroughputEstimationPlugin, airThroughputStates); 
    182                         Parameters params = extractParameters(airThroughputProfile.getParameter()); 
    183                         this.airThroughputProfile.init(params); 
     178                                        airflowState.init(params); 
     179                                        airflowStates.add(airflowState); 
     180                                } 
     181                        } 
     182                        this.airflowProfile = new AirflowProfile(airflowEstimationPlugin, airflowStates); 
     183                        Parameters params = extractParameters(airflowProfile.getParameter()); 
     184                        this.airflowProfile.init(params); 
    184185                } 
    185186        } 
     
    281282        } 
    282283 
    283         public AirThroughputProfile getAirThroughputProfile() { 
    284                 return airThroughputProfile; 
     284        public AirflowProfile getAirflowProfile() { 
     285                return airflowProfile; 
    285286        } 
    286287 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/units/CustomResourceUnitName.java

    r477 r1396  
    11package schedframe.resources.units; 
    22 
    3 public class UserResourceUnitName implements ResourceUnitName { 
     3public class CustomResourceUnitName implements ResourceUnitName { 
    44 
    55        protected String name; 
    66 
    7         public UserResourceUnitName(String name) { 
     7        public CustomResourceUnitName(String name) { 
    88                this.name = name; 
    99        } 
    1010 
    11         public String getName() { 
     11        public String getLabel() { 
    1212                return name; 
    1313        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/units/ResourceUnitFactory.java

    r1384 r1396  
    1818         
    1919        public static ResourceUnit createUnit(String unitName, String resId, int totalAmount, int usedAmount){ 
    20                 if(unitName.equalsIgnoreCase(StandardResourceUnitName.CPU.getName())) 
     20                if(unitName.equalsIgnoreCase(StandardResourceUnitName.CPU.getLabel())) 
    2121                        return new PEUnit(resId, totalAmount, usedAmount); 
    22                 if(unitName.equalsIgnoreCase(StandardResourceUnitName.PE.getName())) 
     22                if(unitName.equalsIgnoreCase(StandardResourceUnitName.PE.getLabel())) 
    2323                        return new PEUnit(resId, totalAmount, usedAmount); 
    24                 else if(unitName.equalsIgnoreCase(StandardResourceUnitName.MEMORY.getName())) 
     24                else if(unitName.equalsIgnoreCase(StandardResourceUnitName.MEMORY.getLabel())) 
    2525                         return new Memory(resId, totalAmount, usedAmount); 
    26                 else if(unitName.equalsIgnoreCase(StandardResourceUnitName.STORAGE.getName())) 
     26                else if(unitName.equalsIgnoreCase(StandardResourceUnitName.STORAGE.getLabel())) 
    2727                         return new Storage(resId, totalAmount, usedAmount); 
    28                 else if(unitName.equalsIgnoreCase(StandardResourceUnitName.GPU.getName())) 
     28                else if(unitName.equalsIgnoreCase(StandardResourceUnitName.GPU.getLabel())) 
    2929                         return new GPU(resId, totalAmount, usedAmount); 
    30                 else if (unitName.equalsIgnoreCase(StandardResourceUnitName.CPUSPEED.getName())) 
     30                else if (unitName.equalsIgnoreCase(StandardResourceUnitName.CPUSPEED.getLabel())) 
    3131                        return new CpuSpeed(resId, totalAmount, usedAmount);  
    32                 else if (unitName.equalsIgnoreCase(StandardResourceUnitName.COST.getName())) 
     32                else if (unitName.equalsIgnoreCase(StandardResourceUnitName.COST.getLabel())) 
    3333                        return new Cost(resId, totalAmount); 
    34                 else if (unitName.equalsIgnoreCase(StandardResourceUnitName.APPLICATION.getName())) 
     34                else if (unitName.equalsIgnoreCase(StandardResourceUnitName.APPLICATION.getLabel())) 
    3535                        return new Applications(resId);  
    3636                else 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/units/ResourceUnitName.java

    r477 r1396  
    33public interface ResourceUnitName { 
    44         
    5         public String getName(); 
     5        public String getLabel(); 
    66 
    77} 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/units/ResourceUnitNameFactory.java

    r477 r1396  
    66        public static ResourceUnitName createResourceUnitName(String unitName){ 
    77 
    8                 if(unitName.equals(StandardResourceUnitName.MEMORY.getName())) 
     8                if(unitName.equals(StandardResourceUnitName.MEMORY.getLabel())) 
    99                        return StandardResourceUnitName.MEMORY; 
    1010                 
    11                 else if (unitName.equals(StandardResourceUnitName.STORAGE.getName())) 
     11                else if (unitName.equals(StandardResourceUnitName.STORAGE.getLabel())) 
    1212                        return StandardResourceUnitName.STORAGE; 
    1313                 
    14                 else if (unitName.equals(StandardResourceUnitName.PE.getName())) 
     14                else if (unitName.equals(StandardResourceUnitName.PE.getLabel())) 
    1515                        return StandardResourceUnitName.PE; 
    1616                 
    17                 else if (unitName.equals(StandardResourceUnitName.CPUSPEED.getName())) 
     17                else if (unitName.equals(StandardResourceUnitName.CPUSPEED.getLabel())) 
    1818                        return StandardResourceUnitName.CPUSPEED; 
    1919                 
    20                 else if (unitName.equals(StandardResourceUnitName.GPU.getName())) 
     20                else if (unitName.equals(StandardResourceUnitName.GPU.getLabel())) 
    2121                        return StandardResourceUnitName.GPU; 
    2222                 
    23                 else if (unitName.equals(StandardResourceUnitName.APPLICATION.getName())) 
     23                else if (unitName.equals(StandardResourceUnitName.APPLICATION.getLabel())) 
    2424                        return StandardResourceUnitName.APPLICATION; 
    2525                 
    26                 else if (unitName.equals(StandardResourceUnitName.COST.getName())) 
     26                else if (unitName.equals(StandardResourceUnitName.COST.getLabel())) 
    2727                        return StandardResourceUnitName.COST; 
    2828 
    29                 else return new UserResourceUnitName(unitName); 
     29                else return new CustomResourceUnitName(unitName); 
    3030        } 
    3131} 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/units/StandardResourceUnitName.java

    r477 r1396  
    4646    } 
    4747 
    48     public String getName(){ 
     48    public String getLabel(){ 
    4949        return this.name; 
    5050    } 
Note: See TracChangeset for help on using the changeset viewer.