calrissian / mango

Common utilities for rapid application development
Apache License 2.0
17 stars 7 forks source link

Better logic around closing a Batcher. #202

Closed eawagner closed 8 years ago

eawagner commented 8 years ago

The biggest change here is to allow a user to guarantee that all data put into a Batcher can either be handled or recovered.

While closing, the batcher will now send the final batch to the handler. Additionally, the close method will wait until all batches have been processed. In the event that there is data left in the processing queue that didn't get processed in a batch, a new closeAndFlush() method was added to retrieved all unprocessed items.