org.apache.qpid.util.concurrent
Class SynchQueue<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractQueue<E>
          extended by org.apache.qpid.util.concurrent.BatchSynchQueueBase<E>
              extended by org.apache.qpid.util.concurrent.SynchQueue<E>
All Implemented Interfaces:
Iterable<E>, Collection<E>, BlockingQueue<E>, Queue<E>, BatchSynchQueue<E>

public class SynchQueue<E>
extends BatchSynchQueueBase<E>

SynchQueue completes the BatchSynchQueueBase abstract class by providing an implementation of the underlying queue as a linked list. This uses FIFO ordering for the queue and allows the queue to grow to accomodate more elements as needed.

CRC Card
Responsibilities Collaborations
Provide linked list FIFO queue to create a batch synched queue around.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.qpid.util.concurrent.BatchSynchQueueBase
BatchSynchQueueBase.SynchRecordImpl<E>, BatchSynchQueueBase.SynchRefImpl
 
Field Summary
 
Fields inherited from class org.apache.qpid.util.concurrent.BatchSynchQueueBase
buffer
 
Constructor Summary
SynchQueue()
           
 
Method Summary
protected
<T> Queue<T>
createQueue()
          Returns an empty queue, implemented as a linked list.
 
Methods inherited from class org.apache.qpid.util.concurrent.BatchSynchQueueBase
drainTo, drainTo, drainTo, drainTo, extract, getBufferCapacity, insert, iterator, offer, offer, peek, peekAtBufferHead, poll, poll, put, remainingCapacity, size, take, tryPut
 
Methods inherited from class java.util.AbstractQueue
add, addAll, clear, element, remove
 
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.concurrent.BlockingQueue
add, contains, remove
 
Methods inherited from interface java.util.Queue
element, remove
 
Methods inherited from interface java.util.Collection
addAll, clear, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArray
 

Constructor Detail

SynchQueue

public SynchQueue()
Method Detail

createQueue

protected <T> Queue<T> createQueue()
Returns an empty queue, implemented as a linked list.

Specified by:
createQueue in class BatchSynchQueueBase<E>
Returns:
An empty queue, implemented as a linked list.


Licensed to the Apache Software Foundation