|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--scorej.SignalProcessor
A signal broker class that matches incoming Signals with SignalWaits and notifies the appropriate SignalWait objects whenever there is a match. The operation of the SignalProcessor is partially controlled by the OmarClock. SignalProcessor is a singleton class, there can only be one instance in a JVM.
OmarClock,
SimulationClock,
NonSimulationClock| Method Summary | |
void |
flushSignalQueueUnsafe()
Clear the signal queue. |
void |
flushSignalWaitQueueUnsafe()
Clear the signal wait queue. |
boolean |
processFirstSignal(boolean flushSignal)
Process the first signal in the queue. |
boolean |
processSignal(Signal signal)
Process a signal. |
void |
reset()
Resets the signal processor by flushing the signal queue and signal wait queue. |
void |
run()
Starts the signal processor in an infinite loop in which it matches incoming signals with waits and notifies the waits upon a match. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public void flushSignalQueueUnsafe()
public void flushSignalWaitQueueUnsafe()
public void reset()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void run()
run in interface java.lang.Runnablepublic boolean processFirstSignal(boolean flushSignal)
flushSignal - boolean:
true = remove the signal after processing it
false = do not remove signal (signal must be cleaned out by a flush
later)
public boolean processSignal(Signal signal)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||