public abstract class RewriteMachine
extends java.lang.Thread
Constructor and Description |
---|
RewriteMachine()
Default Constructor.
|
RewriteMachine(comingle.comms.neighborhood.Neighborhood neighborhood,
SendListener send_listener)
Basic Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add_new_goal(Fact f) |
void |
addExternalGoal(SerializedFact new_goal) |
void |
addExternalGoals(java.util.List<SerializedFact> new_goals) |
void |
addOneTimeQuiescenceListener(QuiescenceListener ql) |
void |
addOneTimeStopListener(StopListener sl) |
void |
addPersistentQuiescenceListener(QuiescenceListener ql) |
void |
addPersistentStopListener(StopListener sl) |
void |
addPersistentTerminateListener(TerminateListener tl) |
void |
changeLocation(int newLoc,
java.lang.String newHost) |
java.util.LinkedList<SerializedFact> |
getExternalGoals() |
java.lang.String |
getFacts() |
Goals<Fact> |
getGoals() |
ConcListStore[] |
getLinearStores() |
int |
getLocation()
Get location of this rewrite machine
|
java.util.Collection<java.lang.Integer> |
getLocations()
Returns all locations that this rewrite machine knows of.
|
java.lang.String |
getPretty() |
java.lang.String |
getPrettyBrief() |
java.util.LinkedList<Store> |
getStores() |
void |
init() |
<F extends Fact> |
introGoal(F fact) |
<F extends Fact> |
introLocalGoal(F fact) |
<T> boolean |
invokeActuator(java.lang.String act_name,
T input) |
java.lang.String |
next_exist_id(int i) |
void |
notify_new_goals() |
void |
performQuiescenceActions() |
void |
performStopActions() |
void |
performTerminateActions() |
void |
restart_rewrite() |
void |
rewriteloop() |
void |
run() |
<T> void |
setActuator(java.lang.String act_name,
ActuatorAction<T> action)
Set the actuator of the actuation named act_name.
|
void |
setupNeighborhood(comingle.comms.neighborhood.Neighborhood neighborhood,
SendListener send_listener)
Setup the neighborhood
|
void |
stop_rewrite() |
void |
terminate_rewrite() |
java.lang.String |
toString() |
void |
wait_for_quiescence() |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield
public RewriteMachine(comingle.comms.neighborhood.Neighborhood neighborhood, SendListener send_listener)
neighborhood
- instance of a neighborhood, through which this runtime instance communicates.send_listener
- the data sending listener.public RewriteMachine()
public void setupNeighborhood(comingle.comms.neighborhood.Neighborhood neighborhood, SendListener send_listener)
neighborhood
- instance of a neighborhood, through which this runtime instance communicates.send_listener
- the data sending listener.public int getLocation()
public java.util.Collection<java.lang.Integer> getLocations()
public void addExternalGoals(java.util.List<SerializedFact> new_goals)
public void addExternalGoal(SerializedFact new_goal)
public java.lang.String next_exist_id(int i)
public java.util.LinkedList<Store> getStores()
public java.util.LinkedList<SerializedFact> getExternalGoals()
public java.lang.String getPrettyBrief()
public java.lang.String getPretty()
public void addPersistentQuiescenceListener(QuiescenceListener ql)
public void addOneTimeQuiescenceListener(QuiescenceListener ql)
public void addPersistentStopListener(StopListener sl)
public void addOneTimeStopListener(StopListener sl)
public void addPersistentTerminateListener(TerminateListener tl)
public void init()
public void rewriteloop()
public <F extends Fact> void introLocalGoal(F fact)
public <F extends Fact> void introGoal(F fact)
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void performQuiescenceActions()
public void performStopActions()
public void performTerminateActions()
public void notify_new_goals()
public void add_new_goal(Fact f)
public void wait_for_quiescence()
public void restart_rewrite()
public void stop_rewrite()
public void terminate_rewrite()
public java.lang.String toString()
toString
in class java.lang.Thread
public java.lang.String getFacts()
public <T> void setActuator(java.lang.String act_name, ActuatorAction<T> action)
act_name
- the name of the actuation.action
- the action executed by this actuator.public <T> boolean invokeActuator(java.lang.String act_name, T input)
public ConcListStore[] getLinearStores()
public void changeLocation(int newLoc, java.lang.String newHost)