|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hypercast.adapters.TimerEventQueue
This class is for storing a set of yet-to-be-processed TimerEvents
Implementation:
The queue is stored in a Java Vector - the element with the highest
time is at index 0, the lowest time is at index the_queue.size()-1.
Constructor Summary | |
TimerEventQueue()
Constructs a TimeEventQueue object |
Method Summary | |
hypercast.adapters.TimerEvent |
getEvent(java.lang.Object id)
Removes a specified time event from the queue. |
long |
getMinEventTime()
Gets the time event with the minimum time |
java.util.Enumeration |
getPendingEvents()
Returns all the pending time event int queue. |
void |
insert(hypercast.adapters.TimerEvent te)
Inserts a time event at a random valid location with the current time at top, future events below. |
boolean |
isEmpty()
Checks if the time event queue is empty. |
boolean |
isPendingEvent(hypercast.adapters.TimerEvent se)
Check if the queue contains a specified time event. |
hypercast.adapters.TimerEvent |
remove(java.lang.Object id)
Removes a specified time event from the queue. |
void |
remove(hypercast.adapters.TimerEvent te)
Removes a specified time event from the queue. |
void |
removeEvents(java.util.Enumeration e)
Removes all the time events in the queue. |
hypercast.adapters.TimerEvent |
removeTop()
Removes the top time event in the queue |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TimerEventQueue()
Method Detail |
public final long getMinEventTime()
public final hypercast.adapters.TimerEvent getEvent(java.lang.Object id)
id
- the id of the time event that to be removedpublic final hypercast.adapters.TimerEvent removeTop()
public final void insert(hypercast.adapters.TimerEvent te)
public final void remove(hypercast.adapters.TimerEvent te)
te
- the time event that to be removedpublic final hypercast.adapters.TimerEvent remove(java.lang.Object id)
id
- the id of the time event that to be removedpublic final void removeEvents(java.util.Enumeration e)
public final boolean isEmpty()
public final boolean isPendingEvent(hypercast.adapters.TimerEvent se)
public final java.util.Enumeration getPendingEvents()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |