Changeset 1447 for DCWoRMS/branches


Ignore:
Timestamp:
09/24/14 15:51:26 (11 years ago)
Author:
wojtekp
Message:
 
Location:
DCWoRMS/branches/coolemall/src
Files:
7 edited

Legend:

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

    r477 r1447  
    33import java.util.Map; 
    44 
    5 import schedframe.events.scheduling.SchedulingEventType; 
     5import schedframe.events.EventType; 
    66 
    77public interface PluginConfiguration { 
     
    1212         * @return 
    1313         */ 
    14         public Map<SchedulingEventType, Object> getServedEvents(); 
     14        public Map<EventType, Object> getServedEvents(); 
    1515 
    1616} 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/ComputingResource.java

    r1440 r1447  
    335335                        }                                        
    336336                } 
     337                 
     338                /*EnergyExtension ee = (EnergyExtension) extensionList.getExtension(ExtensionType.ENERGY_EXTENSION); 
     339                if(ee != null && ee.getPowerProfile() != null){ 
     340                        PluginConfiguration pluginConfig = ee.getPowerProfile().getEnergyEstimationPlugin().getConfiguration(); 
     341                        if (pluginConfig != null) { 
     342                                Map<EventType, Object> events = pluginConfig.getServedEvents(); 
     343                                if (events != null) { 
     344                                        Object obj = events.get(ResourceEventType.TIMER); 
     345                                        if (obj != null) { 
     346                                                int delay = (Integer) obj; 
     347                                                DataCenterWorkloadSimulator.getEventManager().sendToResource(getFullName(), delay, new ResourceEvent(ResourceEventType.TIMER, null)); 
     348                                        } 
     349                                } 
     350                        } 
     351                }*/ 
     352 
     353 
    337354                //alternative way 
    338355                //getEventHandler().handleResourceEvent(new EnergyEvent(EnergyEventType.AIRFLOW_STATE_CHANGED, "Resource controller")); 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/plugin/EnergyPluginConfiguration.java

    r1415 r1447  
    11package schedframe.resources.computing.profiles.energy.power.plugin; 
    22 
     3import java.util.HashMap; 
    34import java.util.Map; 
    45 
    56import schedframe.PluginConfiguration; 
    6 import schedframe.events.scheduling.SchedulingEventType; 
     7import schedframe.events.EventType; 
     8 
    79 
    810public class EnergyPluginConfiguration  implements PluginConfiguration { 
    911         
    10         //private Map<SchedulingEventType, Object> events; 
     12        private Map<EventType, Object> events; 
    1113        private double powerCapLevel; 
    1214        private double powerFloorLevel; 
    1315 
    1416        public EnergyPluginConfiguration(){ 
    15                 //this.events = new HashMap<SchedulingEventType, Object>(); 
     17                this.events = new HashMap<EventType, Object>(2); 
    1618        } 
    1719         
    18         public void addServedEvent(SchedulingEventType eventType, Object argument){ 
    19                 //events.put(eventType, argument); 
     20        public void addServedEvent(EventType eventType, Object argument){ 
     21                this.events.put(eventType, argument); 
    2022        } 
    2123         
    22         public Map<SchedulingEventType, Object> getServedEvents() { 
    23                 //return events; 
    24                 return null; 
     24        public Map<EventType, Object> getServedEvents() { 
     25                return this.events; 
     26                //return null; 
    2527        } 
    2628 
  • DCWoRMS/branches/coolemall/src/schedframe/scheduling/Scheduler.java

    r1415 r1447  
    1717import schedframe.Initializable; 
    1818import schedframe.PluginConfiguration; 
     19import schedframe.events.EventType; 
    1920import schedframe.events.scheduling.SchedulingEventType; 
    2021import schedframe.resources.Resource; 
     
    107108                PluginConfiguration pluginConfig = managementSystem.getSchedulingPluginConfiguration(); 
    108109                if (pluginConfig != null) { 
    109                         Map<SchedulingEventType, Object> events = pluginConfig.getServedEvents(); 
     110                        Map<EventType, Object> events = pluginConfig.getServedEvents(); 
    110111                        if (events != null) { 
    111112                                Object obj = events.get(SchedulingEventType.TIMER); 
  • DCWoRMS/branches/coolemall/src/schedframe/scheduling/plugin/SchedulingPluginConfiguration.java

    r477 r1447  
    55 
    66import schedframe.PluginConfiguration; 
    7 import schedframe.events.scheduling.SchedulingEventType; 
     7import schedframe.events.EventType; 
    88 
    99public class SchedulingPluginConfiguration implements PluginConfiguration { 
    1010         
    11         private Map<SchedulingEventType, Object> events; 
     11        private Map<EventType, Object> events; 
    1212 
    1313        public SchedulingPluginConfiguration(){ 
    14                 this.events = new HashMap<SchedulingEventType, Object>(); 
     14                this.events = new HashMap<EventType, Object>(2); 
    1515        } 
    1616         
    17         public void addServedEvent(SchedulingEventType eventType, Object argument){ 
     17        public void addServedEvent(EventType eventType, Object argument){ 
    1818                events.put(eventType, argument); 
    1919        } 
    2020         
    21         public Map<SchedulingEventType, Object> getServedEvents() { 
     21        public Map<EventType, Object> getServedEvents() { 
    2222                return events; 
    2323        } 
  • DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/AbstractManagementSystem.java

    r1440 r1447  
    1313 
    1414import schedframe.PluginConfiguration; 
     15import schedframe.events.EventType; 
    1516import schedframe.events.scheduling.SchedulingEventType; 
    1617import schedframe.scheduling.Scheduler; 
     
    185186                PluginConfiguration pluginConfig = schedulingPlugin.getConfiguration(); 
    186187                if (pluginConfig != null) { 
    187                         Map<SchedulingEventType, Object> events = pluginConfig.getServedEvents(); 
     188                        Map<EventType, Object> events = pluginConfig.getServedEvents(); 
    188189                        if (events != null) { 
    189190                                Object obj = events.get(SchedulingEventType.TIMER); 
  • DCWoRMS/branches/coolemall/src/simulator/EventManager.java

    r1427 r1447  
    33import eduni.simjava.Sim_event; 
    44import eduni.simjava.Sim_system; 
     5import gridsim.GridSim; 
    56import gridsim.GridSimCore; 
    67import gridsim.GridSimTags; 
     
    3132                super(name, 1); 
    3233                this.simEnv = resourceController; 
     34                 
     35                Integer schedulerIdObj = new Integer(get_id()); 
     36                List<Integer> schedRes = GridSim.getGridResourceList(); 
     37                schedRes.add(schedulerIdObj); 
    3338        } 
    3439 
     
    196201         
    197202        public ResourceBroadcastOrder(List<ComputingResource> computingResources, ResourceEvent event) { 
    198                 super(); 
    199203                this.computingResources = computingResources; 
    200204                this.event = event; 
Note: See TracChangeset for help on using the changeset viewer.