|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
rp1.simulator.SimTaskQueue
public class SimTaskQueue
Provides queue of objects of type SimTask; this class is extended by SimScheduler to provide the backbone of the RP1 simulation. When tasks are added to the queue, they are inserted in order of the values of the time and priority fields and insertion sequence. The waitForNextTask method provides a way of getting the next task for processing or waiting until a new task is added. The SimScheduler extends this method by adding a clock-based delay to create an execution schedule for tasks.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
SimTaskQueue()
|
Method Summary | |
---|---|
void |
add(SimTask newTask)
|
boolean |
isTaskOnQueue(SimTask task)
|
boolean |
remove(SimTask targetTask)
|
void |
removeTasksForOriginator(java.lang.Object originator)
|
void |
run()
|
SimTask |
waitForNextTask()
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SimTaskQueue()
Method Detail |
---|
public boolean isTaskOnQueue(SimTask task)
public void add(SimTask newTask)
public SimTask waitForNextTask()
public boolean remove(SimTask targetTask)
public void removeTasksForOriginator(java.lang.Object originator)
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |