|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jactr.core.queue.TimedEventQueue
public class TimedEventQueue
Tracks TimedEvents within the model. A TimedEvent is any event that must occur by a specific time. All buffer actions are created and placed into this queue so that after the production's execution time has expired, the actions will be executed.
| Constructor Summary | |
|---|---|
TimedEventQueue(IModel model)
|
|
| Method Summary | |
|---|---|
void |
addTimedEventListener(ITimedEventListener tel,
java.util.concurrent.Executor executor)
|
void |
dispose()
|
void |
enqueue(ITimedEvent te)
queue up the event. |
boolean |
fireExpiredEvents(double currentTime)
check the queue for events that should be fired. |
java.util.Collection<ITimedEvent> |
getFiringEvents()
return the events that will fire right now. |
IModel |
getModel()
|
double |
getNextEndTime()
returns the time of the next expiring event, you should check the size first.. |
java.util.Collection<ITimedEvent> |
getPendingEvents()
return all the events that are pending. |
boolean |
isEmpty()
is the queue empty? |
void |
removeTimedEventListener(ITimedEventListener tel)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TimedEventQueue(IModel model)
| Method Detail |
|---|
public void dispose()
public IModel getModel()
public boolean isEmpty()
public double getNextEndTime()
public void enqueue(ITimedEvent te)
public java.util.Collection<ITimedEvent> getPendingEvents()
public java.util.Collection<ITimedEvent> getFiringEvents()
public boolean fireExpiredEvents(double currentTime)
currentTime -
public void addTimedEventListener(ITimedEventListener tel,
java.util.concurrent.Executor executor)
public void removeTimedEventListener(ITimedEventListener tel)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||