|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface 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.BeforeTrace
Abstract handle for a before event |
static interface |
TokenTracer.PullTrace
Abstract handle for a pull event |
static interface |
TokenTracer.StoreTrace
Abstract handle for a store event |
Method Summary | |
---|---|
void |
after(TokenTracer.BeforeTrace before)
Indicate that the right side of a semicolon combinator is continuing. |
TokenTracer.BeforeTrace |
before()
Leaving the left side of a semicolon combinator. |
void |
block(TokenTracer.PullTrace pull)
Block a thread waiting for a future. |
void |
choke(TokenTracer.StoreTrace store)
Killed through the setting of a future. |
void |
die()
Terminate a thread. |
void |
enter(Closure closure)
Enter a closure. |
void |
error(TokenException error)
Report an error. |
TokenTracer |
fork()
Create a new thread. |
void |
leave(int depth)
Leave "depth" closures EXPERIMENTAL |
void |
print(java.lang.String value,
boolean newline)
Print to stdout. |
void |
publish(java.lang.Object value)
Publish a value from the program. |
TokenTracer.PullTrace |
pull()
Create a new future for a pull. |
void |
receive(java.lang.Object value)
Return from a site call. |
void |
send(java.lang.Object site,
java.lang.Object[] arguments)
Call a site. |
TokenTracer.StoreTrace |
store(TokenTracer.PullTrace event,
java.lang.Object value)
Store a value for a future. |
void |
unblock(TokenTracer.StoreTrace store)
Receive a future we were waiting for. |
void |
useStored(TokenTracer.StoreTrace storeTrace)
Called when a token reads a value from a group cell which has already been stored. |
Methods inherited from interface orc.error.Locatable |
---|
setSourceLocation |
Methods inherited from interface orc.error.Located |
---|
getSourceLocation |
Method Detail |
---|
TokenTracer fork()
void die()
void send(java.lang.Object site, java.lang.Object[] arguments)
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)
void choke(TokenTracer.StoreTrace store)
die()
.
void receive(java.lang.Object value)
send(Object, Object[])
.
void block(TokenTracer.PullTrace pull)
void unblock(TokenTracer.StoreTrace store)
void print(java.lang.String value, boolean newline)
void publish(java.lang.Object value)
die()
.
void error(TokenException error)
die()
.
TokenTracer.PullTrace pull()
fork()
.
TokenTracer.BeforeTrace before()
die()
;
otherwise it may be followed by any number of events which happen outside
the scope of the semicolon.
after(BeforeTrace)
.void enter(Closure closure)
void leave(int depth)
void after(TokenTracer.BeforeTrace before)
before
- the BeforeEvent which triggered this eventvoid useStored(TokenTracer.StoreTrace storeTrace)
storeTrace
- the trace produced when store(orc.trace.TokenTracer.PullTrace, Object)
was called
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |