public interface ActorExecutionAspect extends Decorator
For example, a resource scheduler could represent a CPU and actors scheduled on a CPU have execution times. The resource scheduler takes care of scheduling the actors according to a given scheduling strategy and keeping track of the remaining execution times.
| Modifier and Type | Method and Description |
|---|---|
void |
addExecutingListener(ExecutionAspectListener listener)
Add schedule listener.
|
double |
getExecutionTime(NamedObj actor)
Get the execution time of an actor.
|
void |
initializeDecoratedActors()
Iterate through all entities deeply contained by the container,
record for each that it is not executing.
|
boolean |
isWaitingForResource(Actor actor)
Return whether an actor is currently waiting for a resource.
|
boolean |
lastScheduledActorFinished()
Check whether last actor that was scheduled on this resource
scheduler finished execution.
|
void |
notifyExecutionListeners(NamedObj entity,
java.lang.Double time,
ExecutionAspectListener.ExecutionEventType eventType)
Notify execution listeners about rescheduling events.
|
void |
removeExecutionListener(ExecutionAspectListener listener)
Remove schedule listener.
|
Time |
schedule(NamedObj actor,
Time environmentTime,
Time deadline,
Time executionTime)
Schedule the actor.
|
Time |
schedule(Time environmentTime)
Perform rescheduling actions when no new actor requests to be
scheduled.
|
createDecoratorAttributes, decoratedObjects, isGlobalDecoratordescription, getContainer, getDisplayName, getFullName, getName, getName, setNamevoid addExecutingListener(ExecutionAspectListener listener) throws IllegalActionException
listener - The listener to be added.IllegalActionException - If an error occurs in the initialization
of actors scheduled by this resource scheduler.void initializeDecoratedActors() throws IllegalActionException
IllegalActionException - If the decorator parameters cannot be read.double getExecutionTime(NamedObj actor) throws IllegalActionException
actor - The named object.IllegalActionException - Thrown in attribute or token cannot be read.boolean isWaitingForResource(Actor actor)
actor - The actor that might be waiting for a resource.boolean lastScheduledActorFinished()
void notifyExecutionListeners(NamedObj entity, java.lang.Double time, ExecutionAspectListener.ExecutionEventType eventType)
entity - Entity that is being scheduled.time - Time when entity is being scheduled.eventType - Type of event.Time schedule(Time environmentTime) throws IllegalActionException
environmentTime - The outside time.IllegalActionException - Thrown in subclasses.Time schedule(NamedObj actor, Time environmentTime, Time deadline, Time executionTime) throws IllegalActionException
actor - The actor to be scheduled.environmentTime - The current platform time.deadline - The deadline timestamp of the event to be scheduled.
This can be the same as the environmentTime.executionTime - The execution time of the actor.IllegalActionException - Thrown if actor parameters such
as execution time or priority cannot be read.void removeExecutionListener(ExecutionAspectListener listener)
listener - The listener to be removed.