Measures message sizes using serialization.
More...
|
| | MsgSizeMonitor () throws IOException |
| | Constructor.
|
| void | close () |
| | Closes the stream.
|
| void | run () |
| long | getMsgSize (Object dest, Message msg) throws IOException |
| | Computes the size of the input message.
|
|
| PipedInputStream | createNewDest (Object dest) throws IOException |
| | Creates a new message destination.
|
|
| Object | currentDest |
| | Destination of the current message.
|
| HashMap< Object, ObjectOutputStream > | out = new HashMap<Object, ObjectOutputStream> () |
| | The output streams to which messages are written, classified by destination.
|
| HashMap< Object, PipedOutputStream > | outRaw = new HashMap<Object, PipedOutputStream> () |
| | The streams underlying out, classified by destination.
|
| HashMap< Object, PipedInputStream > | in = new HashMap<Object, PipedInputStream> () |
| | The input streams from which bytes are read, classified by destination.
|
| Thread | writer |
| | The writer thread.
|
| SynchronousQueue< Message > | queue = new SynchronousQueue<Message> () |
| | Used by the reader to pass a message to the writer.
|
| boolean | doneWriting = false |
| | Used by the writer to tell the reader that it is done writing the message.
|
| boolean | wroteLastByte = false |
| | Used by the writer to tell the reader that it has written the additional closing byte.
|
Measures message sizes using serialization.
- Author
- Thomas Leaute
◆ MsgSizeMonitor()
| frodo2.communication.MsgSizeMonitor.MsgSizeMonitor |
( |
| ) |
throws IOException |
Constructor.
- Exceptions
-
| IOException | if the constructor failed to create the streams |
◆ close()
| void frodo2.communication.MsgSizeMonitor.close |
( |
| ) |
|
◆ createNewDest()
| PipedInputStream frodo2.communication.MsgSizeMonitor.createNewDest |
( |
Object | dest | ) |
throws IOException |
|
private |
Creates a new message destination.
- Parameters
-
- Returns
- the new input stream
- Exceptions
-
| IOException | if an I/O error occurs |
Referenced by getMsgSize().
◆ getMsgSize()
| long frodo2.communication.MsgSizeMonitor.getMsgSize |
( |
Object | dest, |
|
|
Message | msg ) throws IOException |
◆ run()
| void frodo2.communication.MsgSizeMonitor.run |
( |
| ) |
|
◆ currentDest
| Object frodo2.communication.MsgSizeMonitor.currentDest |
|
private |
Destination of the current message.
◆ doneWriting
| boolean frodo2.communication.MsgSizeMonitor.doneWriting = false |
|
private |
Used by the writer to tell the reader that it is done writing the message.
◆ in
| HashMap<Object, PipedInputStream> frodo2.communication.MsgSizeMonitor.in = new HashMap<Object, PipedInputStream> () |
|
private |
The input streams from which bytes are read, classified by destination.
◆ out
| HashMap<Object, ObjectOutputStream> frodo2.communication.MsgSizeMonitor.out = new HashMap<Object, ObjectOutputStream> () |
|
private |
The output streams to which messages are written, classified by destination.
◆ outRaw
| HashMap<Object, PipedOutputStream> frodo2.communication.MsgSizeMonitor.outRaw = new HashMap<Object, PipedOutputStream> () |
|
private |
The streams underlying out, classified by destination.
◆ queue
| SynchronousQueue<Message> frodo2.communication.MsgSizeMonitor.queue = new SynchronousQueue<Message> () |
|
private |
Used by the reader to pass a message to the writer.
◆ writer
| Thread frodo2.communication.MsgSizeMonitor.writer |
|
private |
◆ wroteLastByte
| boolean frodo2.communication.MsgSizeMonitor.wroteLastByte = false |
|
private |
Used by the writer to tell the reader that it has written the additional closing byte.
The documentation for this class was generated from the following file: