|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorc.runtime.Token
public class Token
Representation of an active thread of execution. Tokens move over the node graph as they are executed. They contain an environment, and may belong to a group. They also preserve the call chain and contain a value to be passed to the next token.
Field Summary | |
---|---|
Node |
node
The location of the token in the DAG; determines what the token will do next. |
Method Summary | |
---|---|
void |
activate()
|
Token |
bind(java.lang.Object f)
Push a new future onto the environment stack |
void |
debug(java.lang.String s)
|
void |
delay(int delay)
|
void |
die()
Kill this token. |
Token |
enterClosure(Closure closure,
Node next)
Enter a closure by moving to a new node and environment, and setting the continuation for leaveClosure() . |
void |
error(TokenException problem)
|
Token |
fork()
Fork a token. |
Token |
fork(Group group,
Region region)
Fork a token with a specified group and region. |
OrcEngine |
getEngine()
|
Env<java.lang.Object> |
getEnvironment()
|
Group |
getGroup()
|
Node |
getNode()
|
Region |
getRegion()
|
java.lang.Object |
getResult()
|
SourceLocation |
getSourceLocation()
|
TokenTracer |
getTracer()
|
Transaction |
getTransaction()
|
Token |
leaveClosure()
Leave a closure by returning to the continuation set by #enterClosure(Node, Env, Node) . |
java.lang.Object |
lookup(Arg var)
Lookup a variable in the environment |
Token |
move(Node node)
Move to a node node |
void |
popLtimer()
|
void |
print(java.lang.String string,
boolean newline)
Print something (for use by the print and println sites). |
void |
process()
If a token is alive, calls the node to perform the next action. |
void |
publish()
Publish a value to the top level. |
void |
pushLtimer()
|
void |
requireCapability(java.lang.String name,
boolean ifNull)
|
void |
resume()
|
void |
resume(java.lang.Object object)
|
Token |
setGroup(Group group)
|
void |
setQuiescent()
|
Token |
setRegion(Region region)
Migrate the token from one region to another. |
Token |
setResult(java.lang.Object result)
|
void |
setSourceLocation(SourceLocation location)
|
Token |
setTransaction(Transaction trans)
|
void |
unsetQuiescent()
|
Token |
unwind(int width)
Pop values off of the environment stack. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Node node
Method Detail |
---|
public final void die()
public final void process()
public final Node getNode()
public final Group getGroup()
public final Env<java.lang.Object> getEnvironment()
public final java.lang.Object getResult()
public final OrcEngine getEngine()
public final Region getRegion()
public final Transaction getTransaction()
public final Token setResult(java.lang.Object result)
public final Token setGroup(Group group)
public final Token setTransaction(Transaction trans)
public final Token setRegion(Region region)
public final TokenTracer getTracer()
public final Token move(Node node)
node
- the node to move to
public final Token enterClosure(Closure closure, Node next) throws StackLimitReachedError
leaveClosure()
.
StackLimitReachedError
public final Token leaveClosure()
#enterClosure(Node, Env, Node)
.
public final Token bind(java.lang.Object f)
f
- future to push
public final Token unwind(int width)
width
- number of bindings to leave
public final java.lang.Object lookup(Arg var) throws SiteResolutionException
var
- variable name
SiteResolutionException
public final void debug(java.lang.String s)
public final void activate()
public final void resume(java.lang.Object object)
public final void resume()
public final void error(TokenException problem)
public final void print(java.lang.String string, boolean newline)
public final void publish()
public final Token fork() throws TokenLimitReachedError
TokenLimitReachedError
fork(Group, Region)
public final Token fork(Group group, Region region) throws TokenLimitReachedError
TokenLimitReachedError
public final void setSourceLocation(SourceLocation location)
setSourceLocation
in interface Locatable
public final SourceLocation getSourceLocation()
getSourceLocation
in interface Located
public final void unsetQuiescent()
public final void setQuiescent()
public final void requireCapability(java.lang.String name, boolean ifNull) throws CapabilityException
CapabilityException
public final void delay(int delay)
public final void pushLtimer()
public final void popLtimer() throws SiteException
SiteException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |