|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectoutputStrategy.Batch
final class Batch
Data structure used to stores processed messages until output is requested
(see putOutBatch()
). Then, all messages in the buffer are
submitted to the InputOutputHandler
, which sends them to their
destination. Messages are added in sorted manner (alphabetic, ascending
order) to prevent linkability of (incoming and outgoing) messages due to
their position in the input and output stream.
This class is thread-safe.
Constructor Summary | |
---|---|
protected |
Batch(int initialMessageBufferSize,
boolean isRequestBatch,
boolean belongsToLastMix,
InputOutputHandlerController inputOutputHandlerController)
Constructs a new Batch that can be used to stores processed
messages until output is requested (see putOutBatch() ). |
Method Summary | |
---|---|
protected void |
addMessage(Message message)
Adds the bypassed message to the local buffer (at the correct position according to alphabetic, ascending order). |
protected void |
putOutBatch()
Puts out the current batch, by submitting all messages in buffer to the InputOutputHandler , which sends them to their
destination. |
protected int |
size()
Returns the total number of messages currently in this Batch . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Batch(int initialMessageBufferSize, boolean isRequestBatch, boolean belongsToLastMix, InputOutputHandlerController inputOutputHandlerController)
Batch
that can be used to stores processed
messages until output is requested (see putOutBatch()
).
initialMessageBufferSize
- Initial size for the data structure
(ArrayList
) used to
store messages.isRequestBatch
- Indicates whether this
Batch
is used to
collect Request
s or
Reply
ies.belongsToLastMix
- Indicates whether this
Batch
belongs to the
last mix of a cascade or not.inputOutputHandlerController
- Reference on component
InputOutputHandler
(used to send messages to their
destination when
putOutBatch()
was
called).Method Detail |
---|
protected int size()
Batch
.
Batch
.protected void addMessage(Message message)
message
- Message to be added to local buffer.protected void putOutBatch()
InputOutputHandler
, which sends them to their
destination.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |