commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Gruenberg (JIRA)" <>
Subject [jira] [Updated] (COLLECTIONS-432) Replace Buffer interface with java.util.Queue
Date Sat, 16 Feb 2013 09:27:13 GMT


Christian Gruenberg updated COLLECTIONS-432:

    Attachment: commons.patch

UnmodifiableBuffer not necessary, because Queue is a java.util.Collection. So you can use

ArrayStack is replaced with java.util.Collections.asLifoQueue (Java6) or java.util.ArrayDequeue

BoundedFifoBuffer is replaced with java.util.concurrent.ArrayBlockingQueue 

CircularFifoBuffer is replaced with java.util.concurrent.ArrayBlockingQueue.

PredicatedBuffer transfered into PredivatedBuffer

PriorityBuffer is replaced with java.util.PriorityQueue

SynchronizedBuffer is replaced with java.util.concurrent.SynchronizedQueue

BlockingBuffer is replaced with java.util.concurrent.BlockingQueue (practical java.util.concurrent.ArrayBlockingQueue
or java.util.concurrent.SynchronizedQueue)

BoundedBuffer is replaced with java.util.concurrent.ArrayBlockingQueue

TransformedBuffer transfered into TransformedQueue

UnboundedFifoBuffer is replaced with java.util.concurrent.ArrayBlockingQueue

CollectionUtils isFull() maxSize() java.util.concurrent.ArrayBlockingQueue or java.util.ArrayDequeue

BufferUnderflowException not necessary any more
BufferOverflowException not necessary any more
> Replace Buffer interface with java.util.Queue
> ---------------------------------------------
>                 Key: COLLECTIONS-432
>                 URL:
>             Project: Commons Collections
>          Issue Type: Improvement
>    Affects Versions: 4.0
>            Reporter: Thomas Neidhart
>             Fix For: 4.0
>         Attachments: commons.patch
> Since jdk 1.5, a new interface Queue is available which is basically identical to the
Buffer interface of CC.
> Some of our implementations already have a counterpart in the jdk:
> * BoundedFifoBuffer -> LinkedBlockingQueue or ArrayBlockingQueue
> * UnboundedFifoBuffer -> LinkedList or ArrayDeque
> * PriorityBuffer -> PriorityQueue
> Thus the Buffer queue shall be replaced by the existing Queue, unneeded implementations
be removed and the rest adapted.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message