|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.nps.moves.logger.LogWriter
public class LogWriter
Writes the contents of the PDU buffer to the file in a separate thread. This accepts Lists of PDUs from the reader thread and writes them out in XML format. Since the reader thread may be faster at times than the writer, we can queue up PDU lists and write them out as we get the chance.
Constructor Summary | |
---|---|
LogWriter(java.lang.String pExerciseName)
Creates a new instance of LogWriter. |
Method Summary | |
---|---|
void |
addListToWriteQueue(java.util.List<Pdu> pduList)
Add a list of PDUs to our write queue |
boolean |
finishedWriting()
Test to see whether we're done writing and it's OK to quit the thread |
void |
run()
Start writing PDUs. |
void |
setUnqueuedPdus(boolean state)
Irritating interaction with the reder thread. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LogWriter(java.lang.String pExerciseName)
pExerciseName
- Method Detail |
---|
public void setUnqueuedPdus(boolean state)
state
- public void addListToWriteQueue(java.util.List<Pdu> pduList)
pduList
- public void run()
run
in interface java.lang.Runnable
public boolean finishedWriting()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |