[concurrency-interest] Too late to add a pushBack method to B
Mon, 8 Sep 2003 13:31:20 -0500
I'm currently using a LinkedQueue in a mode where I could use a pushback.
In my code it's only one object at a time, so I was able to restructure the
code. It does a peek() and, if the decision is made to "consume" the
retrieved object, a take().
A pushback would make the code structure cleaner, but I wonder if it would
cost more in synchronization?
> -----Original Message-----
> From: David Walend [mailto:email@example.com]
> Sent: Monday, September 08, 2003 12:58 PM
> To: firstname.lastname@example.org
> Subject: [concurrency-interest] Too late to add a pushBack method to
> A friend of mine is trying to add message acknowledgment to Somnifugi
> JMS. I'm trying to make some long-range plans to use
> java.util.concurrent.BlockingQueues, and I think I need a method that
> isn't there.
> JMS acknowledge is a little strange. Under CLIENT_ACKNOWLEDGE, a JMS
> client can keep taking messages without acknowledging any of them
> immediately. Normally the client will acknowledge one of the messages
> before a time out. If the client doesn't acknowledge in time,
> then the
> JMS Session has to redeliver all of the unacknowledged
> messages in the
> correct order. To keep the order correct, we need to be able
> to push a
> message back onto the head of the queue.
> My friend is about to hack Professor Lea's LinkedNodes to get the
> pushBack method we need. When jskd 1.5 comes out, I'd like to upgrade
> from hacked Channel API to not-hacked BlockingQueue API.
> Is it too late to plead a case for a pushBack method? Does
> anyone else
> need this?
> David Walend
> Concurrency-interest mailing list