|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.domains.de.kernel.DECQEventQueue
A calendar queue implementation of the DE event queue. This stores DE events in the order of their time stamps, microstep and the depth of the destination actor. One DEEvent is said to be earlier than another if it has a smaller time stamp, or when the time stamps are identical and it has a smaller microstep, or when both time stamps and microsteps are identical and it has a smaller depth.
Its complexity is theoretically O(1) for both enqueue and dequeue operations, assuming a reasonable distribution of time stamps.
DEReceiver,
CalendarQueue,
DEEventQueue,
DEDirector
| Green (cxh) |
| Green (liuj) |
| Constructor Summary | |
DECQEventQueue()
Construct an empty event queue. |
|
DECQEventQueue(int minBinCount,
int binCountFactor,
boolean isAdaptive)
Construct an empty event queue with a minimum bin number a bin count factor, and a boolean indicating whether the queue is adaptive. |
|
| Method Summary | |
void |
addDebugListener(DebugListener listener)
Append a listener to the current set of debug listeners. |
void |
clear()
Empty the event queue. |
DEEvent |
get()
Return the earliest event in the queue without removing the event from the queue. |
boolean |
isEmpty()
Return true if this event queue is empty. |
void |
put(DEEvent event)
Enqueue an event into the event queue and notify all threads that are stalled waiting for an event to be put in the queue. |
void |
removeDebugListener(DebugListener listener)
Unregister a debug listener. |
DEEvent |
take()
Dequeue the earliest event in this event queue. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DECQEventQueue()
public DECQEventQueue(int minBinCount,
int binCountFactor,
boolean isAdaptive)
minBinCount - The minimum number of bins.binCountFactor - The factor when changing the bin count.isAdaptive - If the queue changes its number of bins
at run time.| Method Detail |
public void addDebugListener(DebugListener listener)
addDebugListener in interface Debuggablelistener - A listener to which to send debug messages.public void clear()
clear in interface DEEventQueuepublic final DEEvent get()
get in interface DEEventQueueInvalidStateException - If the queue is empty.public final boolean isEmpty()
isEmpty in interface DEEventQueuepublic final void put(DEEvent event)
put in interface DEEventQueueevent - The event to enqueue.public void removeDebugListener(DebugListener listener)
removeDebugListener in interface Debuggablelistener - The listener to remove from the list of listeners
to which debug messages are sent.public final DEEvent take()
take in interface DEEventQueueInvalidStateException - If the queue is empty.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||