[concurrency-interest] Proposal WeightedLinkedBoundedQueue

Thierry Hanot thanot at infovista.com
Wed Nov 22 07:18:19 EST 2006


 

A small proposal for adding a new class in the concurrent package.

All bounded collection are bounded to avoid to use to much memory.(At
least in my case :-)).

But the element put in those collections are often with different size. 

In my case  BoundedQueue is used as an event queue and we can have
composite events which contains itself many events.

What do you think about adding some bounded collection no more based on
the count but on the sum of the weight of the object inside?

 

After a quick look on the code of the LinkedBoundedQueue it seems pretty
easy to do.

 

Does somebody else can see the advantage of this kind of object and is
there enough people interested to make it a part of the concurrent
package?

 

B.R

 

 

Thierry Hanot  

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20061122/90fb1313/attachment.html 


More information about the Concurrency-interest mailing list