public final class JacobVPU
extends java.lang.Object
Constructor and Description |
---|
JacobVPU()
Default constructor.
|
JacobVPU(ExecutionQueue executionQueue)
Re-hydration constructor.
|
JacobVPU(ExecutionQueue context,
JacobRunnable concretion)
Instantiation constructor; used to initialize context with the concretion
of a process abstraction.
|
Modifier and Type | Method and Description |
---|---|
static JacobThread |
activeJacobThread()
Get the active Jacob thread, i.e.
|
void |
addReaction(JacobObject jo,
java.lang.reflect.Method method,
java.lang.Object[] args,
java.lang.String desc)
Add an item to the run queue.
|
void |
dumpState()
Dump the state of the VPU for debugging purposes.
|
boolean |
execute()
Execute one VPU cycle.
|
void |
flush() |
void |
inject(JacobRunnable concretion)
Inject a concretion into the process context.
|
boolean |
isComplete() |
void |
registerExtension(java.lang.Class extensionClass,
java.lang.Object obj) |
void |
setClassLoader(java.lang.ClassLoader classLoader) |
void |
setContext(ExecutionQueue executionQueue)
Set the state of of the VPU; this is analagous to loading a CPU with a
thread's context (re-hydration).
|
public JacobVPU()
public JacobVPU(ExecutionQueue executionQueue)
executionQueue
- previously saved execution contextpublic JacobVPU(ExecutionQueue context, JacobRunnable concretion)
context
- virgin context objectconcretion
- the processpublic boolean execute()
true
if the run queue is not empty after this cycle, false
otherwise.public void flush()
public void setContext(ExecutionQueue executionQueue)
executionQueue
- process executionQueue (state)public void registerExtension(java.lang.Class extensionClass, java.lang.Object obj)
public void addReaction(JacobObject jo, java.lang.reflect.Method method, java.lang.Object[] args, java.lang.String desc)
public static JacobThread activeJacobThread()
public void inject(JacobRunnable concretion)
P
to P|Q
where
P
is the previous process context and Q
is
the injected process. This method is equivalent to the parallel operator,
but is intended to be used from outside of an active JacobThread
.public void setClassLoader(java.lang.ClassLoader classLoader)
public void dumpState()
public boolean isComplete()