|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.sim.kiem.execution.ProducerExecution
public class ProducerExecution
The Class ProducerExecution. This implements the behavior of a producer worker thread that
operates on one dedicated DataComponenet that is a pure producer.
A producer needs no input data and hence is called in the beginning of a step so that it has the
maximum time to concurrently compute its results.
If a blockingStep()
is scheduled then the producer worker thread is awaked and can start
to compute data. When the method blockingWaitUntilDone()
is called, then this blocks
until the data is computed.
Note that this could also trigger a time out in the execution thread.
Constructor Summary | |
---|---|
ProducerExecution(AbstractDataComponent dataComponentParam,
Execution parentParam)
Instantiates a new producer execution worker thread. |
Method Summary | |
---|---|
void |
blockingStep()
Schedule a (blocking) step. |
void |
blockingWaitUntilDone()
Blocking wait until done. |
JSONObject |
getData()
Gets the JSON data that was produced by the producer DataComponent. |
void |
run()
When an object implementing interface Runnable is used
to create a thread, starting the thread causes the object's
run method to be called in that separately executing
thread. |
void |
stopExecution()
Terminates the execution of this thread. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProducerExecution(AbstractDataComponent dataComponentParam, Execution parentParam)
dataComponentParam
- the affected DataComponentparentParam
- the parent executionMethod Detail |
---|
public void blockingStep()
blockingWaitUntilDone()
)
AND the waiting producer thread but only the producer thread will proceed, cause done
is guaranteed to be false!
public void blockingWaitUntilDone()
public JSONObject getData()
public void stopExecution()
public void run()
Runnable
is used
to create a thread, starting the thread causes the object's
run
method to be called in that separately executing
thread.
run
in interface Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |