[ 
https://issues.apache.org/jira/browse/COLLECTIONS-733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16971287#comment-16971287
 ] 

Chen commented on COLLECTIONS-733:
----------------------------------

Maybe you can use a wrapper of ArrayBlockingQueue, check the capacity before 
pushing an element into the queue, if the queue is full, creat a new bigger 
ArrayBlockingQueue. Operations can only be blocked when the queue is empty. Is 
this queue what you want?

> Thread-Safe Array Blocking Deque
> --------------------------------
>
>                 Key: COLLECTIONS-733
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-733
>             Project: Commons Collections
>          Issue Type: New Feature
>            Reporter: David Mollitor
>            Priority: Major
>
> The JDK offers an 
> [ArrayDeque|https://docs.oracle.com/javase/8/docs/api/java/util/ArrayDeque.html]
>  which is a resizable-array implementation of the 
> [Deque|https://docs.oracle.com/javase/8/docs/api/java/util/Deque.html] 
> interface.
> The JDK also offers an 
> [ArrayBlockingQueue|https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ArrayBlockingQueue.html]
>  which is a bounded blocking queue backed by an array.
> What I have had the need for several times now is a resizable-array 
> implementation of a bounded blocking queue.  It should implement all the same 
> methods as the {{ArrayBlockingQueue}} but it can grow as needed, like an 
> {{ArrayDeque}}.  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to