|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.realtime.Scheduler | +--javax.realtime.DebugScheduler
DebugScheduler
is a scheduler designed to test the rest of the system.
It produces a prodigious amount of debugging output as well as asserting many invariants.
Field Summary | |
(package private) javax.realtime.RefList |
disabledThreads
|
(package private) static javax.realtime.DebugScheduler |
instance
|
(package private) java.util.Iterator |
iterator
|
(package private) javax.realtime.RefList |
threadList
|
Fields inherited from class javax.realtime.Scheduler |
defaultScheduler |
Constructor Summary | |
protected |
DebugScheduler()
|
Method Summary | |
protected void |
addThread(long threadID)
Used for adding a C thread that doesn't have any Java counterpart. |
protected void |
addThread(javax.realtime.RealtimeThread thread)
Adds a thread to the thread list |
protected void |
addToFeasibility(javax.realtime.Schedulable schedulable)
It is always feasible to add another thread to a DebugScheduler. |
protected long |
chooseThread(long currentTime)
Chooses a thread to run |
protected void |
disableThread(long threadID)
Stop running threadID until enableThread -
used in the lock implementation to wait on a lock. |
protected void |
enableThread(long threadID)
Enable threadID , allowing it run again - used in notify |
void |
fireSchedulable(javax.realtime.Schedulable schedulable)
Trigger the execution of a schedulable object (like an AsyncEventHandler . |
java.lang.String |
getPolicyName()
Used to determine the policy of the Scheduler . |
static javax.realtime.DebugScheduler |
instance()
Return an instance of a DebugScheduler |
boolean |
isFeasible()
It is always feasible to add another thread to a DebugScheduler. |
protected boolean |
isFeasible(javax.realtime.Schedulable s,
javax.realtime.ReleaseParameters rp)
It is always feasible to add another thread to a DebugScheduler. |
protected void |
removeFromFeasibility(javax.realtime.Schedulable schedulable)
It is always feasible to add another thread to a DebugScheduler. |
protected void |
removeThread(long threadID)
Used for removing a C thread that doesn't have any Java counterpart. |
protected void |
removeThread(javax.realtime.RealtimeThread thread)
Removes a thread from the thread list |
boolean |
setIfFeasible(javax.realtime.Schedulable schedulable,
javax.realtime.ReleaseParameters release,
javax.realtime.MemoryParameters memory)
It is always feasible to add another thread to a DebugScheduler. |
boolean |
setIfFeasible(javax.realtime.Schedulable schedulable,
javax.realtime.ReleaseParameters release,
javax.realtime.MemoryParameters memory,
javax.realtime.ProcessingGroupParameters group)
It is always feasible to add another thread to a DebugScheduler. |
java.lang.String |
toString()
|
protected void |
waitForNextPeriod(javax.realtime.RealtimeThread rt)
Cause the thread to block until the next period |
Methods inherited from class javax.realtime.Scheduler |
addThreadToLists, atomic, getDefaultScheduler, jAddCThread, jChooseThread, jDisableThread, jEnableThread, jNumThreads, jRemoveCThread, print, removeThreadFromLists, setDefaultScheduler, setQuanta |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
static javax.realtime.DebugScheduler instance
javax.realtime.RefList threadList
javax.realtime.RefList disabledThreads
java.util.Iterator iterator
Constructor Detail |
protected DebugScheduler()
Method Detail |
public static javax.realtime.DebugScheduler instance()
protected void addToFeasibility(javax.realtime.Schedulable schedulable)
addToFeasibility
in class Scheduler
schedulable
- A reference to the given instance of Schedulable
.
public void fireSchedulable(javax.realtime.Schedulable schedulable)
Scheduler
AsyncEventHandler
.
fireSchedulable
in class Scheduler
schedulable
- The Schedulable object to make active.public java.lang.String getPolicyName()
Scheduler
.
getPolicyName
in class Scheduler
java.lang.String
object which is the name
of the scheduling polixy used by this
.public boolean isFeasible()
isFeasible
in class Scheduler
protected boolean isFeasible(javax.realtime.Schedulable s, javax.realtime.ReleaseParameters rp)
isFeasible
in class Scheduler
protected void removeFromFeasibility(javax.realtime.Schedulable schedulable)
removeFromFeasibility
in class Scheduler
public boolean setIfFeasible(javax.realtime.Schedulable schedulable, javax.realtime.ReleaseParameters release, javax.realtime.MemoryParameters memory)
setIfFeasible
in class Scheduler
schedulable
- The instance of Schedulable
to which the
parameters will be assigned.release
- The proposed release parameters.memory
- The proposed memory parameters.
public boolean setIfFeasible(javax.realtime.Schedulable schedulable, javax.realtime.ReleaseParameters release, javax.realtime.MemoryParameters memory, javax.realtime.ProcessingGroupParameters group)
setIfFeasible
in class Scheduler
schedulable
- The instance of Schedulable
to which the
parameters will be assigned.release
- The proposed release parameters.memory
- The proposed memory parameters.group
- The proposed processing group parameters.
protected long chooseThread(long currentTime)
Scheduler
chooseThread
in class Scheduler
protected void addThread(javax.realtime.RealtimeThread thread)
Scheduler
addThread
in class Scheduler
protected void removeThread(javax.realtime.RealtimeThread thread)
Scheduler
removeThread
in class Scheduler
protected void addThread(long threadID)
Scheduler
addThread
in class Scheduler
protected void removeThread(long threadID)
Scheduler
removeThread
in class Scheduler
protected void disableThread(long threadID)
Scheduler
threadID
until enableThread -
used in the lock implementation to wait on a lock.
disableThread
in class Scheduler
protected void enableThread(long threadID)
Scheduler
threadID
, allowing it run again - used in notify
enableThread
in class Scheduler
protected void waitForNextPeriod(javax.realtime.RealtimeThread rt)
Scheduler
waitForNextPeriod
in class Scheduler
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |