edu.cmu.emulator.event
Class EmuEventQueue
java.lang.Object
edu.cmu.emulator.event.EmuEventQueue
- All Implemented Interfaces:
- Runnable
public class EmuEventQueue
- extends Object
- implements Runnable
The thread that processes the Emulator events. Maintains
a queue of events in the form of a splay tree. Executes
events at the time specified within the event object.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
eventSplayTree
private ESplayTree eventSplayTree
running
private boolean running
synch
private Object synch
thisThread
protected Thread thisThread
SLEEP_RESOLUTION
private static final long SLEEP_RESOLUTION
- See Also:
- Constant Field Values
lastEventTime
private long lastEventTime
size
private int size
eventsAdded
private long eventsAdded
eventsRemovedBeforeExecution
private long eventsRemovedBeforeExecution
eventsRemovedForExecution
private long eventsRemovedForExecution
debug
private static final boolean debug
- See Also:
- Constant Field Values
nextEID
private long nextEID
log
protected static Logger log
EmuEventQueue
public EmuEventQueue()
getNextEID
protected long getNextEID()
start
public Thread start()
insertEvent
public void insertEvent(EmuEvent event)
removeEvent
public void removeEvent(EmuEvent event)
getNextEvent
public EmuEvent getNextEvent()
getNextEventTime
public long getNextEventTime()
addEvents
public void addEvents(ArrayList newEvents)
throws IOException
- Throws:
IOException
userActive
public boolean userActive()
- check user status.
- Returns:
- True if user is active.
run
public void run()
- Specified by:
run
in interface Runnable
display
public void display()
size
public int size()
getEventsAdded
public long getEventsAdded()
getEventsRemovedBeforeExecution
public long getEventsRemovedBeforeExecution()
getEventsRemovedForExecution
public long getEventsRemovedForExecution()
displayStats
public void displayStats()
execEvent
private void execEvent(EmuEvent event)
Copyright © 2013. All Rights Reserved.