[concurrency-interest] ConcurrentLinkedQueue implementation

Vishal Byakod vishal.byakod at gmail.com
Mon Apr 27 12:48:55 EDT 2009


Apologize for the proof reader's mistake.

I would have wanted a ConcurrentLinkedDeque implementation as in my
case I need to write an efficient API for handling client acknowledge
calls in a JMS Provider.

I am new to this post, can someone tell me if a ConcurrentLinkedDeque
is being planned in the near future?

Vishal


On Mon, Apr 27, 2009 at 9:26 PM, Brian S O'Neill <bronee at gmail.com> wrote:
> Please re-read Martin's response. Note the use of the word "Deque" instead
> of "Queue". Also, if you're looking for a ConcurrentLinkedDeque
> implementation, none is provided in the JDK.
>
> Vishal Byakod wrote:
>>
>> Martin,
>> I need an API to insert an object at the beginning of a list and also
>> one which can remove the first element from a list( just as  LinkedList
>> removeFirst() &  LinkedList addFirst(). LinkedBlockingQueue has API's
>> to insert at the end and retreive from the head. The collection also
>> has to be highly performant under concurrent access.
>>
>> Can you think of anything else?
>>
>> Thanks
>> Vishal
>>
>> On Mon, Apr 27, 2009 at 8:13 PM, Martin Buchholz <martinrb at google.com>
>> wrote:
>>
>>>
>>> LinkedList is a Deque, but ConcurrentLinkedQueue intentionally is not.
>>> You could try LinkedBlockingDeque instead.
>>>
>>> Martin
>>>
>>> On Mon, Apr 27, 2009 at 06:58, Vishal Byakod <vishal.byakod at gmail.com>
>>> wrote:
>>>
>>>>
>>>> Hi,
>>>>
>>>> I want to replace java.util.LinkedList with the ConcurrentLinkedQueue
>>>> implementation, but am not sure what to use for LinkedList.addFirst()
>>>> and LinkedList removeFirst(). ConcurrentLinkedQueue does’nt seem to
>>>> have equivalent API’s.
>>>>
>>>> Can anyone suggest what other options I have.
>>>>
>>>> Thanks
>>>> Vishal
>>>>
>>>> _______________________________________________
>>>> Concurrency-interest mailing list
>>>> Concurrency-interest at cs.oswego.edu
>>>> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>>>>
>>>>
>>
>> _______________________________________________
>> Concurrency-interest mailing list
>> Concurrency-interest at cs.oswego.edu
>> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>>
>>
>



More information about the Concurrency-interest mailing list