| java.lang.Object org.cougaar.planning.servlet.ServletWorker org.cougaar.glm.servlet.GLMStimulatorWorker
GLMStimulatorWorker | public class GLMStimulatorWorker extends ServletWorker (Code) | |
One created for every URL access.
If either waitBefore or waitAfter is true, uses a blackboard
service, a watcher, and a trigger to monitor published tasks to see
when they are complete.
|
batchesSent | protected int batchesSent(Code) | | batches sent so far
|
debug | protected boolean debug(Code) | | dump debug output if true
|
forPrep | protected String forPrep(Code) | | option override of task FOR preposition
|
interval | protected long interval(Code) | | millis between batches
|
nextSendTime | protected long nextSendTime(Code) | | when was the last batch sent
|
rescindAfterComplete | protected boolean rescindAfterComplete(Code) | | remove the injected tasks after they have been completed
|
sentTasks | protected Map sentTasks(Code) | | Collection of tasks that have been sent. Needed for later rescinds
|
tasksPerBatch | protected int tasksPerBatch(Code) | | tasks per batch
|
testStart | protected long testStart(Code) | | start of the whole test
|
totalBatches | protected int totalBatches(Code) | | total batches requested
|
useConfidence | protected boolean useConfidence(Code) | | use confidence to determine when task is complete
|
waitAfter | protected boolean waitAfter(Code) | | wait for completion after publishing everything
|
waitBefore | protected boolean waitBefore(Code) | | wait for completion before publishing next batch
|
blackboardChanged | protected void blackboardChanged()(Code) | | Called when one of the tasks that was added to the blackboard has
it's plan element change. If the task has been successfully
disposed, it is removed from the sentTasks Map.
|
getElapsedTime | protected String getElapsedTime(long diff)(Code) | | encodes a time interval in a min:sec:millis format
|
getResult | protected XMLable getResult()(Code) | | Main work done here.
Sends the first batch of tasks, and keeps sending until totalBatches have been
sent. If should wait for completion, waits until notified by blackboardChanged ().
Will wait interval milliseconds between batches if there are
more than one batches to send.
See Also: GLMStimulatorWorker.getSettings See Also: GLMStimulatorWorker.blackboardChanged an "XMLable" result. |
getSettings | public void getSettings(String name, String value)(Code) | |
Use a query parameter to set a field
Sets the recognized parameters : inputFile, debug, totalBatches, tasksPerBatch, interval, and wait
|
printTestingSummary | protected void printTestingSummary()(Code) | | record the elapsed time
|
readXmlTasks | protected Collection readXmlTasks(String xmlTaskFile)(Code) | | Parse the xml file and return the COUGAAR tasks.
Parameters: xmlTaskFile - file defining tasks to stimulate cluster with Collection of tasks defined in xml file |
recordTime | protected void recordTime(String taskUID, Date sentTime)(Code) | | records the time taken for the task
|
sendNextBatch | protected void sendNextBatch(boolean withinTransaction)(Code) | | Publishes the tasks created by readXmlTasks.
For each task, adds to sentTasks map of task to its send time.
sentTasks is used later by blackboardChanged to determine how long the
task took to complete.
See Also: GLMStimulatorWorker.readXmlTasks See Also: GLMStimulatorWorker.blackboardChanged Parameters: withinTransaction - - true when called from handleSuccessfulPlanElementthis avoids having nested transactions |
|
|