|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object orc.trace.TokenTracer
public abstract class TokenTracer
Interface for writing traces from a single Orc thread. Methods correspond to events which may be traced; in essence this is like a visitor of execution events. Some guidelines used to organize events:
error(TokenException)
followed by die()
. We could make the
die()
implicit but making it explicit facilitates code reuse in the
client and simplifies queries.
"Trace" objects (TokenTracer.StoreTrace
et al) serve as abstract handles for
events and are used to record relationships between events in different
threads. Since Java doesn't have existential types, implementors have to cast
these objects to the appropriate concrete types internally. This is safe as
long as all the TokenTracers produced by a single Tracer
use use
compatible concrete trace types.
Nested Class Summary | |
---|---|
static interface |
TokenTracer.PullTrace
Abstract handle for a pull event |
static interface |
TokenTracer.StoreTrace
Abstract handle for a store event |
Constructor Summary | |
---|---|
TokenTracer()
|
Method Summary | |
---|---|
abstract void |
block(TokenTracer.PullTrace pull)
Block a thread waiting for a future. |
abstract void |
choke(TokenTracer.StoreTrace store)
Killed through the setting of a future. |
abstract void |
die()
Terminate a thread. |
abstract void |
enter(Closure closure)
Enter a closure. |
abstract void |
error(TokenException error)
Report an error. |
abstract TokenTracer |
fork()
Create a new thread. |
abstract void |
leave(int depth)
Leave "depth" closures EXPERIMENTAL |
abstract void |
print(java.lang.String value,
boolean newline)
Print to stdout. |
abstract void |
publish(java.lang.Object value)
Publish a value from the program. |
abstract TokenTracer.PullTrace |
pull()
Create a new future for a pull. |
abstract void |
receive(java.lang.Object value)
Return from a site call. |
abstract void |
send(java.lang.Object site,
java.lang.Object[] arguments)
Call a site. |
abstract TokenTracer.StoreTrace |
store(TokenTracer.PullTrace event,
java.lang.Object value)
Store a value for a future. |
abstract void |
unblock(TokenTracer.StoreTrace store)
Receive a future we were waiting for. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface orc.error.Locatable |
---|
setSourceLocation |
Methods inherited from interface orc.error.Located |
---|
getSourceLocation |
Constructor Detail |
---|
public TokenTracer()
Method Detail |
---|
public abstract TokenTracer fork()
public abstract void die()
public abstract void send(java.lang.Object site, java.lang.Object[] arguments)
public abstract TokenTracer.StoreTrace store(TokenTracer.PullTrace event, java.lang.Object value)
choke(StoreTrace)
.
The engine guarantees that all
choke(orc.trace.TokenTracer.StoreTrace)
and
unblock(orc.trace.TokenTracer.StoreTrace)
events will occur
before the die()
event for this tracer.
choke(orc.trace.TokenTracer.StoreTrace)
,
unblock(orc.trace.TokenTracer.StoreTrace)
public abstract void choke(TokenTracer.StoreTrace store)
die()
.
public abstract void receive(java.lang.Object value)
send(Object, Object[])
.
public abstract void block(TokenTracer.PullTrace pull)
public abstract void unblock(TokenTracer.StoreTrace store)
public abstract void print(java.lang.String value, boolean newline)
public abstract void publish(java.lang.Object value)
die()
.
public abstract void error(TokenException error)
die()
.
public abstract TokenTracer.PullTrace pull()
fork()
.
public abstract void enter(Closure closure)
public abstract void leave(int depth)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |