BlockingQueue and capacity issue
"Jean Morissette" <[email protected]> Mon, 29 Nov 2004 12:55:09 -0500
| Newsgroups | gmane.comp.java.seda.user |
|---|---|
| Message-ID | <[email protected]> |
<html><div style='background-color:'><DIV class=RTE>Now that we want to support BlockingQueue operations, we have some issue with the queue capacity.</DIV> <DIV class=RTE>Presently, queue capacity is handled by ThreesholdPredicate and can be changed dynamically by ResponseTimeConctrollerIF. So, the queue is not aware of its capacity.</DIV> <DIV class=RTE>Suppose that threads are waiting to enqueue because the queue is full (see blocking_enqueue method). If the capacity increase, we must notify the threads because the queue is now not full. How to achieve that?</DIV> <DIV class=RTE>One possibility could be to make aware the queue of its capacity with a method Queue.setCapacity and remove ThreesholdPredicate. That is, the ResponseTimeConctrollerIF could change the queue capacity by calling directly Queue.setCapacity instead of using ThreesholdPredicate. </DIV> <DIV class=RTE>Any comments?<BR>Jean M</DIV></div></html> ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/