I don't like the idea of copying.
I'd recommend for now doing something like the following,
Maintain a ConcurrentHashSet of refs in the queue as well as the normal
PriorityLinkedList.
As ref is added to queue, if it has a non zero expiry time then add it to that set too. On
acknowledge remove from set too.
Then the expiry thread can iterate that set without any problems.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192168#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...