Hi all,I have a requirement for a blocking queue that implements some sort of batching. In other words, I want a BlockingQueue implementation where the take() method blocks until either the queue reaches a specified batch size or (optionally) an expiration time. On the flipside put() will block until the amount of elements that were available at the time the queue reached the batch size or the expiration are drained.The use case is that I have units of work that are exceptionally more efficient when done as larger batches. I would like producers of work to be able to add individual items to the queue above and consumers to ideally be able to drain larger batches if they are available. For example, I could wait for the queue to contain either 100 items or for 100ms to pass before my consumer is allowed to drain it.My question is; can anyone think of any parts of the Guava library that does the above or would make implementing the above more straightforward than me creating a BlockingQueue implementation myself? I assume this would actually be a relatively common requirement for certain domains so perhaps the Guava team has already added something similar or some of the building blocks.Thanks,Remon.--
--
guava-...@googlegroups.com
Project site: http://guava-libraries.googlecode.com
This group: http://groups.google.com/group/guava-discuss
This list is for general discussion.
To report an issue: http://code.google.com/p/guava-libraries/issues/entry
To get help: http://stackoverflow.com/questions/ask (use the tag "guava")
---
You received this message because you are subscribed to the Google Groups "guava-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to guava-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.