public class Job
extends java.lang.Object
Constructor and Description |
---|
Job(Director director,
double relativeDeadline,
double executionTime,
Actor task)
Construct a new job released by a task, with an execution time, a relative deadline,
and release time equal to the current time of a director.
|
Job(Director director,
double relativeDeadline,
double executionTime,
Actor task,
Actor parentTask)
Construct a new job released by a task contained in a parent task, with an execution
time, a relative deadline, and release time equal to the current time of a director.
|
Modifier and Type | Method and Description |
---|---|
void |
executeFor(Time time)
Execute the job for an amount of time.
|
Time |
getAbsoluteDeadline()
Return the absolute deadline of the job.
|
Actor |
getParentTask()
Return the parent of the task that released the job.
|
Time |
getRemainingTime()
Return the time the job still needs to execute for to complete its execution.
|
Time |
getStartTime()
Return the time that the job was released.
|
Actor |
getTask()
Return the task that released the job.
|
public Job(Director director, double relativeDeadline, double executionTime, Actor task) throws IllegalActionException
director
- The director whose current time is the release time of the job.relativeDeadline
- The relative deadline of the job.executionTime
- The execution time of the job.task
- The task that released the job.IllegalActionException
- If the Time constructor throws it.public Job(Director director, double relativeDeadline, double executionTime, Actor task, Actor parentTask) throws IllegalActionException
director
- The director whose current time is the release time of the job.relativeDeadline
- The relative deadline of the job.executionTime
- The execution time of the job.task
- The task that released the job.parentTask
- The parent of the task that released the job.IllegalActionException
- If the Time constructor throws it.public void executeFor(Time time)
time
- The time to execute the job for.public Time getAbsoluteDeadline()
public Actor getParentTask()
public Time getRemainingTime()
public Time getStartTime()
public Actor getTask()