Changeset 1447 for DCWoRMS/branches
- Timestamp:
- 09/24/14 15:51:26 (11 years ago)
- Location:
- DCWoRMS/branches/coolemall/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/schedframe/PluginConfiguration.java
r477 r1447 3 3 import java.util.Map; 4 4 5 import schedframe.events. scheduling.SchedulingEventType;5 import schedframe.events.EventType; 6 6 7 7 public interface PluginConfiguration { … … 12 12 * @return 13 13 */ 14 public Map< SchedulingEventType, Object> getServedEvents();14 public Map<EventType, Object> getServedEvents(); 15 15 16 16 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/ComputingResource.java
r1440 r1447 335 335 } 336 336 } 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 337 354 //alternative way 338 355 //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 1 1 package schedframe.resources.computing.profiles.energy.power.plugin; 2 2 3 import java.util.HashMap; 3 4 import java.util.Map; 4 5 5 6 import schedframe.PluginConfiguration; 6 import schedframe.events.scheduling.SchedulingEventType; 7 import schedframe.events.EventType; 8 7 9 8 10 public class EnergyPluginConfiguration implements PluginConfiguration { 9 11 10 //private Map<SchedulingEventType, Object> events;12 private Map<EventType, Object> events; 11 13 private double powerCapLevel; 12 14 private double powerFloorLevel; 13 15 14 16 public EnergyPluginConfiguration(){ 15 //this.events = new HashMap<SchedulingEventType, Object>();17 this.events = new HashMap<EventType, Object>(2); 16 18 } 17 19 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); 20 22 } 21 23 22 public Map< SchedulingEventType, Object> getServedEvents() {23 //returnevents;24 return null;24 public Map<EventType, Object> getServedEvents() { 25 return this.events; 26 //return null; 25 27 } 26 28 -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/Scheduler.java
r1415 r1447 17 17 import schedframe.Initializable; 18 18 import schedframe.PluginConfiguration; 19 import schedframe.events.EventType; 19 20 import schedframe.events.scheduling.SchedulingEventType; 20 21 import schedframe.resources.Resource; … … 107 108 PluginConfiguration pluginConfig = managementSystem.getSchedulingPluginConfiguration(); 108 109 if (pluginConfig != null) { 109 Map< SchedulingEventType, Object> events = pluginConfig.getServedEvents();110 Map<EventType, Object> events = pluginConfig.getServedEvents(); 110 111 if (events != null) { 111 112 Object obj = events.get(SchedulingEventType.TIMER); -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/plugin/SchedulingPluginConfiguration.java
r477 r1447 5 5 6 6 import schedframe.PluginConfiguration; 7 import schedframe.events. scheduling.SchedulingEventType;7 import schedframe.events.EventType; 8 8 9 9 public class SchedulingPluginConfiguration implements PluginConfiguration { 10 10 11 private Map< SchedulingEventType, Object> events;11 private Map<EventType, Object> events; 12 12 13 13 public SchedulingPluginConfiguration(){ 14 this.events = new HashMap< SchedulingEventType, Object>();14 this.events = new HashMap<EventType, Object>(2); 15 15 } 16 16 17 public void addServedEvent( SchedulingEventType eventType, Object argument){17 public void addServedEvent(EventType eventType, Object argument){ 18 18 events.put(eventType, argument); 19 19 } 20 20 21 public Map< SchedulingEventType, Object> getServedEvents() {21 public Map<EventType, Object> getServedEvents() { 22 22 return events; 23 23 } -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/AbstractManagementSystem.java
r1440 r1447 13 13 14 14 import schedframe.PluginConfiguration; 15 import schedframe.events.EventType; 15 16 import schedframe.events.scheduling.SchedulingEventType; 16 17 import schedframe.scheduling.Scheduler; … … 185 186 PluginConfiguration pluginConfig = schedulingPlugin.getConfiguration(); 186 187 if (pluginConfig != null) { 187 Map< SchedulingEventType, Object> events = pluginConfig.getServedEvents();188 Map<EventType, Object> events = pluginConfig.getServedEvents(); 188 189 if (events != null) { 189 190 Object obj = events.get(SchedulingEventType.TIMER); -
DCWoRMS/branches/coolemall/src/simulator/EventManager.java
r1427 r1447 3 3 import eduni.simjava.Sim_event; 4 4 import eduni.simjava.Sim_system; 5 import gridsim.GridSim; 5 6 import gridsim.GridSimCore; 6 7 import gridsim.GridSimTags; … … 31 32 super(name, 1); 32 33 this.simEnv = resourceController; 34 35 Integer schedulerIdObj = new Integer(get_id()); 36 List<Integer> schedRes = GridSim.getGridResourceList(); 37 schedRes.add(schedulerIdObj); 33 38 } 34 39 … … 196 201 197 202 public ResourceBroadcastOrder(List<ComputingResource> computingResources, ResourceEvent event) { 198 super();199 203 this.computingResources = computingResources; 200 204 this.event = event;
Note: See TracChangeset
for help on using the changeset viewer.