|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorc.runtime.OrcEngine
public class OrcEngine
The Orc Engine provides the main loop for executing active tokens. Tokens are always processed in a single thread, but tokens might be activated or resumed from other threads, so some synchronization is necessary.
Field Summary | |
---|---|
boolean |
debugMode
|
protected boolean |
halt
This flag is set by the Execution region when execution completes to terminate the engine. |
Constructor Summary | |
---|---|
OrcEngine()
|
Method Summary | |
---|---|
void |
activate(Token t)
Activate a token by adding it to the queue of active tokens |
boolean |
addClock(LogicalClock clock)
|
void |
debug(java.lang.String s)
|
Token |
getCurrentToken()
Provide access to a package static method. |
boolean |
isDead()
|
void |
print(java.lang.String string)
Print something (for use by the print and println sites). |
void |
println(java.lang.String string)
Print something (for use by the print and println sites). |
void |
pub(Value v)
Publish a result. |
void |
reportRound()
|
void |
resume(Token t)
Activate a token by adding it to the queue of returning tokens |
void |
run()
Process active nodes, running indefinitely until signalled to stop by a call to terminate(). |
void |
run(Node root)
Run Orc given a root node. |
void |
run(Node root,
Env env)
|
void |
setCurrentToken(Token caller)
Provide access to a package static method. |
void |
start(Node root)
|
void |
start(Node root,
Env env)
|
protected boolean |
step()
Run one step (process one token, handle one site response, or advance all logical clocks). |
void |
terminate()
Terminate execution. |
void |
tokenError(Token t,
TokenException problem)
A token owned by this engine has encountered an exception. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public boolean debugMode
protected boolean halt
Constructor Detail |
---|
public OrcEngine()
Method Detail |
---|
public boolean isDead()
public void run()
run
in interface java.lang.Runnable
public void terminate()
public void run(Node root)
root
- node to runpublic void run(Node root, Env env)
public void start(Node root)
public void start(Node root, Env env)
protected boolean step()
public void activate(Token t)
t
- the token to be addedpublic void resume(Token t)
t
- the token to be addedpublic void pub(Value v)
v
- public void tokenError(Token t, TokenException problem)
public void debug(java.lang.String s)
public void reportRound()
public boolean addClock(LogicalClock clock)
public void print(java.lang.String string)
string
- public void println(java.lang.String string)
string
- public void setCurrentToken(Token caller)
public Token getCurrentToken()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |