|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.erights.e.elib.vat.Runner
Untamed:
Field Summary | |
private FlexList |
myEStack
A stack of EStackItem s used for causality tracing. |
(package private) Vat |
myOptServingVat
To be set by PendingEvent to the Vat that enqueued the event
currently being served, or null if idle. |
(package private) long |
myServingTicket
To be set by PendingEvent to the ticket taken from
myOptServingVat by the event currently being served at the time that
event was enqueued, or -1 if idle. |
Constructor Summary | |
(package private) |
Runner()
|
Method Summary | |
(package private) abstract void |
addDeadManSwitch(Object deadManSwitch)
Remember the deadManSwitch, so that if I'm shut down, I can notify him. |
(package private) abstract void |
disturbEvent(Throwable t)
Deprecated. Since Thread.stop(Throwable) is also deprecated,
but will be available as long as Thread.stop(Throwable)
remains available. |
(package private) abstract Throwable |
enqueue(PendingEvent todo)
Add todo to the queue my thread is servicing |
(package private) static Runner |
getCurrentRunner()
If called from within a thread servicing a Runner, returns that Runner; otherwise it's an external thread and we throw an exception. |
(package private) static Runner |
getOptCurrentRunner()
If called from within a thread servicing a Runner, returns that Runner; otherwise it's an external thread and we return null. |
(package private) static ConstList |
getOptEStack()
Returns a list of EStackItem s |
(package private) Vat |
getOptServingVat()
The Vat that queued the event now being run(), or null if idle. |
(package private) abstract String |
getRunnerKind()
What kind of Runner is this? |
(package private) abstract boolean |
isCurrent()
Is the current thread this Runner's thread (the thread servicing this Vat)? |
(package private) static Runner |
obtainRunner(String runnerKind)
optName defaults to null |
(package private) static Runner |
obtainRunner(String runnerKind,
String optName)
Gets or makes a Runner of the specified kind. |
static void |
popEStackItem()
Enabled: XXX Should be suppressed by taming. |
static void |
pushEStackItem(EStackItem item)
Enabled: XXX Should be suppressed by taming. |
(package private) void |
requireCurrent()
If not isCurrent() , throw an exception |
(package private) long |
servingTicket()
The ticket number of the event currently being run(), or -1 if idle. |
(package private) abstract void |
setPriority(int newPriority)
Requests a change of priority of the thread servicing this Runner. |
(package private) Runner |
shorten()
If x.shorten() != x, then this Runner is no more, and should not be used. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
Vat myOptServingVat
PendingEvent
to the Vat that enqueued the event
currently being served, or null if idle.
long myServingTicket
PendingEvent
to the ticket taken from
myOptServingVat by the event currently being served at the time that
event was enqueued, or -1 if idle.
private final FlexList myEStack
EStackItem
s used for causality tracing.
Constructor Detail |
Runner()
Method Detail |
static Runner getOptCurrentRunner()
There are two kinds of threads which we take to be servicing a Runner.
RunnerThread
created to service a Runner, currently
used for the "headless" and "swt" runnerKinds.
static Runner getCurrentRunner()
static Runner obtainRunner(String runnerKind)
obtainRunner(String, String)
static Runner obtainRunner(String runnerKind, String optName)
runnerKind
- says which kind
of
Runner to make.optName
- If we are making a new Runner, the name is used to tag
it and its thread for debugging purposes.public static void pushEStackItem(EStackItem item)
public static void popEStackItem()
static ConstList getOptEStack()
EStackItem
s
Runner shorten()
HeadlessRunner
s.
abstract Throwable enqueue(PendingEvent todo)
abstract void setPriority(int newPriority)
abstract void disturbEvent(Throwable t)
Thread.stop(Throwable)
is also deprecated,
but will be available as long as Thread.stop(Throwable)
remains available.
Note that Thread.stop() does not stop the thread (obvious huh?), but rather causes that thread to experience a "spontaneously" thrown exception.
Vat getOptServingVat()
Used for causality tracing.
servingTicket()
long servingTicket()
Used for causality tracing. The serving ticket count was dispensed by
one of my enqueueing Vats and can only be understood relative to
that Vat. Use getOptServingVat()
to get that Vat.
abstract String getRunnerKind()
A kind of Runner determines which kind of "devices" (eg, AWT or SWT widgets) may be synchronously accessed from within this Runner
abstract boolean isCurrent()
If it is, we say we are executing inside this Runner.
r.isCurrent() implies
getCurrentRunner()
== r.
void requireCurrent()
isCurrent()
, throw an exception
abstract void addDeadManSwitch(Object deadManSwitch)
The deadManSwitch is only notified if it's be a boot-ref (a Ref handled
by a BootRefHandler
whose target's vat is a vat handled by a
different Runner. Otherwise, the notification would need to occur in
this Runner, which is presumably already shut down.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |