- Timestamp:
- 07/15/14 16:26:31 (11 years ago)
- Location:
- DCWoRMS/branches/coolemall/src/schedframe/events/scheduling
- Files:
-
- 2 added
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/ResourceStateChangedEvent.java
r1316 r1415 1 1 package schedframe.events.scheduling; 2 2 3 import schedframe. events.EventType;3 import schedframe.resources.computing.profiles.energy.ResourceEventType; 4 4 5 public class ResourceStateChangedEvent 5 public class ResourceStateChangedEvent extends SchedulingEvent { 6 6 7 protected String resourceName; 8 protected EventType eventType; 7 protected ResourceEventType eventType; 9 8 10 public ResourceStateChangedEvent( String resourceName,EventType eventType) {9 public ResourceStateChangedEvent(ResourceEventType eventType) { 11 10 super(SchedulingEventType.RESOURCE_STATE_CHANGED); 12 this.resourceName = resourceName;13 11 this.eventType = eventType; 14 12 } 15 13 16 public String getResourceName() {17 return resourceName;18 }19 14 20 public EventType getEventType() {15 public ResourceEventType getResourceEventType() { 21 16 return eventType; 22 17 } -
DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/SchedulingEvent.java
r1316 r1415 2 2 3 3 import schedframe.events.Event; 4 import schedframe.events.EventReason; 4 5 import schedframe.events.EventType; 5 6 … … 25 26 schedEventType = (SchedulingEventType)type; 26 27 } catch(Exception e){ 27 schedEventType = SchedulingEventType.RESOURCE_STATE_CHANGED;28 schedEventType = null; 28 29 } 29 30 return schedEventType; … … 42 43 } 43 44 44 public int getTag() {45 return type.getTag();46 }47 48 45 public Object getData() { 49 46 return null; -
DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/SchedulingEventCommand.java
r1316 r1415 1 1 package schedframe.events.scheduling; 2 2 3 import schedframe.events.Event;4 3 import schedframe.events.EventCommand; 5 4 import schedframe.resources.computing.ComputingResource; 5 import schedframe.resources.computing.profiles.energy.ResourceEvent; 6 6 7 7 public class SchedulingEventCommand implements EventCommand { … … 13 13 } 14 14 15 public void execute( Event event) {16 SchedulingEvent ev = new ResourceStateChangedEvent( compResource.getFullName(),event.getType());15 public void execute(ResourceEvent event) { 16 SchedulingEvent ev = new ResourceStateChangedEvent(event.getType()); 17 17 ev.setSource(compResource.getFullName()); 18 18 compResource.getEventHandler().handleSchedulingEvent(ev); -
DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/SchedulingEventType.java
r1360 r1415 6 6 7 7 // task related 8 TASK_FINISHED(1), 9 TASK_FAILED(2), 10 TASK_CANCELED(4), 11 TASK_ARRIVED(8), 12 TASK_PAUSED(16), 13 TASK_RESUMED(32), 14 TASK_MOVED(64), 15 START_TASK_EXECUTION(128), 16 TASK_REQUESTED_TIME_EXPIRED(256), 8 TASK_FINISHED, 9 TASK_FAILED, 10 TASK_CANCELED, 11 TASK_ARRIVED, 12 TASK_PAUSED, 13 TASK_RESUMED, 14 TASK_MOVED, 15 TASK_EXECUTION_CHANGED, 16 START_TASK_EXECUTION, 17 TASK_REQUESTED_TIME_EXPIRED, 17 18 18 19 //job related 19 JOB_ARRIVED (512),20 JOB_FINISHED (1024),21 JOB_FAILED (2048),22 JOB_CANCELED (4096),20 JOB_ARRIVED, 21 JOB_FINISHED, 22 JOB_FAILED, 23 JOB_CANCELED, 23 24 24 25 //time related 25 TIMER(8192), 26 TIMER, 27 28 //resource related 29 RESOURCE_FAILED, 30 //provider related (relevant to grid scheduling) 31 PROVIDER_FAILED, 32 33 RESOURCE_STATE_CHANGED, 26 34 27 //reservation related 28 RESERVATION_ACTIVE(16384), 29 RESERVATION_FINISHED(32768), 30 RESERVATION_FAILED(65536), 31 RESERVATION_EXPIRED(131072), 32 33 //resource related 34 RESOURCE_FAILED(262144), 35 //provider related (relevant to grid scheduling) 36 PROVIDER_FAILED(524288), 35 POWER_LIMIT_EXCEEDED; 37 36 38 RESOURCE_STATE_CHANGED(1048576),39 40 POWER_LIMIT_EXCEEDED(2097152)41 ;42 43 protected int tag;44 45 private SchedulingEventType(int tag){46 this.tag = tag;47 }48 49 public int getTag(){50 return this.tag;51 }52 37 53 38 public String getName(){ -
DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/TaskCanceledEvent.java
r477 r1415 2 2 3 3 import java.util.List; 4 5 import schedframe.events.EventReason; 4 6 5 7
Note: See TracChangeset
for help on using the changeset viewer.