This patch does two things:
- serializes flow of records through the RecordsChannel
- simplifies the batching logic
The two are connected: rather than queuing records in ConcurrentLinkedQueue, we now buffer
downloaded records in an ArrayList, and deliver them to the receiving repository all at once.
Doing this work right at the channel level lets us kill off the buffering middleware.
An addition of a NonBufferingSyncStage lets individual SyncStages use a RecordsChannel which
doesn't perform any kind of buffering. Prior, stages did this by wrapping their receiving repositories
in the buffering middleware.
The main goal is to speed up the flow of records, keep within the same memory footprint
and do some simplification in the process.
This patch explicitly does not address the delegated nature of fetch and store, which is now largely irrelevant.
MozReview-Commit-ID: J2afmgr1Td1
--HG--
extra : rebase_source : 62f5f7940bb8db9a18704edfd0b9cb38eb410b71