java.lang.Object
de.grogra.rgg.ConcurrentTask
- All Implemented Interfaces:
PartialTask
,Serializable
,Runnable
- Direct Known Subclasses:
ProducerTask
This abstract class has to be used as base class for concurrent
tasks in the context of an RGG. Such a task must not perform any
immediate modification to the graph, however, it is allowed to
add quasi-parallel actions to one of the queues of the current
extent (see
Graph.getQueues()
). This
includes XL rule application and quasi-parallel assignments to
XL properties.
The task is implemented by the run
method of the
superinterface Runnable
as in the following example:
ConcurrentTask task = new ConcurrentTask () { public void run () [ X ==> Y; a:A ::> a[value] :+= 1; ] };
A concurrent task is added to an instance of
ConcurrentTasks
, then the invocation
of solve
on this instance will execute
all added concurrent tasks.
- Author:
- Ole Kniemeyer
- See Also:
-
Constructor Details
-
ConcurrentTask
public ConcurrentTask()
-
-
Method Details
-
markProcessed
public void markProcessed() -
setGraphState
-
getGraphState
-