|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.agentfactory.cldc.scheduler.ExTime
public class ExTime
The ExTime represents a period at which a task can be executed. All tasks that execute at the same period use the same ExTime object. The ExTime object phase shifts agents so as to reduce computation bottlenecks.
| Constructor Summary | |
|---|---|
ExTime(int period,
int randVal)
Constructs an instance of ExTime. |
|
| Method Summary | |
|---|---|
void |
newAgt()
Increase the number of agents operating at a particular period. |
void |
removeAgt(java.util.Hashtable table)
Removes the period from the hashtable if there are no more agents scheduled to execute at that period. |
void |
reSched()
Creates a new execution time value from a combination of the current time and the random start time. |
void |
writeTime(java.io.DataOutputStream dos)
Writes the period at which the agents execute to the data output stream. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExTime(int period,
int randVal)
period - the period at which the tasks should be executed.randVal - a random start time value.| Method Detail |
|---|
public void reSched()
public void removeAgt(java.util.Hashtable table)
table - the hashtable the period is to be removed from.public void newAgt()
public void writeTime(java.io.DataOutputStream dos)
throws java.io.IOException
dos - the stream to which the period is written.
java.io.IOException - if there is an I/O error.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||