|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.ac.man.cs.rainbow.simulator.Scheduler
System for scheduling Rainbow threads. Specialisations of this
class schedule with emphasis on getting timing right (the Simulator
class) or with emphasis on being able to
describe the system for state-space exploration (the StateEnumerator
class.)
RainbowThread
Inner Class Summary | |
static interface |
Scheduler.ExternalExecutionServer
Marker for classes that handle external executions. |
static class |
Scheduler.LabellingAdapter
An empty implementation of a LabellingListener that is suitable for subclassing to get subsets of the full behaviour. |
static interface |
Scheduler.LabellingListener
Marker for classes that accept labelling notifications. |
static class |
Scheduler.ThreadingAdapter
An empty implementation of a LabellingListener that is suitable for subclassing to get subsets of the full behaviour. |
static interface |
Scheduler.ThreadingListener
Marker for classes that accept threading notifications. |
Constructor Summary | |
Scheduler()
|
Method Summary | |
abstract void |
addCodeThread(RASMCode codeBlock)
Add a top-level thread to the scheduler. |
void |
addLabellingListener(Scheduler.LabellingListener l)
Register a class for receipt of labelling notifications. |
void |
addThreadingListener(Scheduler.ThreadingListener l)
Register a class for receipt of threading notifications. |
protected abstract void |
asap(RainbowThread thread)
Schedule the given thread for execution. |
protected abstract boolean |
delay(RainbowThread thread,
int delay)
Request that the given thread be delayed for a bit. |
abstract long |
getTime()
Get the current time. |
abstract void |
initialise()
Initialise the scheduler and scheduled system. |
Data |
readKeyedRegister(int key)
Request the contents of the register indexed by the given key. |
Data |
readKeyedRegister(Integer key)
Request the contents of the register indexed by the given key. |
void |
removeLabellingListener(Scheduler.LabellingListener l)
Unregister a class from receipt of labelling notifications. |
void |
removeThreadingListener(Scheduler.ThreadingListener l)
Unregister a class from receipt of threading notifications. |
protected abstract void |
reverse(RainbowThread thread)
Schedule the given thread for execution. |
void |
setExternalExecutionServer(Scheduler.ExternalExecutionServer eServ)
Set the external execution server for a simulation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Scheduler()
Method Detail |
protected abstract void asap(RainbowThread thread)
thread
- The thread to schedule.protected abstract void reverse(RainbowThread thread)
thread
- The thread to schedule.protected abstract boolean delay(RainbowThread thread, int delay)
thread
- The thread to delay.delay
- How long to delay for (in ATUs - Arbitrary Time Units.)public abstract long getTime()
public abstract void initialise() throws RainbowException
RainbowException
- If something goes wrong during initialisation.public abstract void addCodeThread(RASMCode codeBlock)
codeBlock
- The block of code whose first instruction is the entry point
to the system.public final void addLabellingListener(Scheduler.LabellingListener l)
public final void removeLabellingListener(Scheduler.LabellingListener l)
public final void addThreadingListener(Scheduler.ThreadingListener l)
public final void removeThreadingListener(Scheduler.ThreadingListener l)
public final Data readKeyedRegister(int key) throws RainbowException
public final Data readKeyedRegister(Integer key) throws RainbowException
public final void setExternalExecutionServer(Scheduler.ExternalExecutionServer eServ)
RASM.TclExec
,
Scheduler.ExternalExecutionServer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |