-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
We oftentimes have iteration through a MessageBatch and removal, e.g.
for(Message msg: batch) { if(condition) batch.remove(msg); } }
This is inefficient for large batches, as MessageBatch.remove() iterates through the batch until it finds the message to be nulled.
It is more efficient to use BatchIterator.remove().
Also include a BatchIterator.replace() method.
Pedro's code: [1] https://github.com/pruivo/JGroups/tree/t_msg_batch_iterator