|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgps.event.SimEventScheduler
public final class SimEventScheduler
Discrete event driver. It maintains an event queue for events to be triggered; provides functions for adding and canceling events; also maintains current virtual time.
| Method Summary | |
|---|---|
boolean |
cancel(SimEvent e)
cancels a scheduled event, and remove it from the queue |
SimEvent |
dequeue()
gets a most prioriety SimEvent from the heap queue. |
void |
discharge()
empties the event queue, logs discharged events in event log |
boolean |
enqueue(SimEvent e)
adds a SimEvent to the event queue |
double |
getCurrent()
gets current virtual time in simulation. |
static java.util.logging.Logger |
getEventLog()
gets event log |
static SimEventScheduler |
getInstance()
gets scheduler singleton instance |
static void |
main(java.lang.String[] args)
for test purpose |
void |
reset()
empties the event queue without log, and reset current time to 0. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.util.logging.Logger getEventLog()
public boolean enqueue(SimEvent e)
e - the new event to be added to the queuepublic SimEvent dequeue()
public boolean cancel(SimEvent e)
e - event to be canceledpublic double getCurrent()
public static SimEventScheduler getInstance()
public void discharge()
public void reset()
public static void main(java.lang.String[] args)
args - inputs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||