org.apache.qpid.util
Class ConcurrentLinkedMessageQueueAtomicSize<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractQueue<E>
java.util.concurrent.ConcurrentLinkedQueue<E>
org.apache.qpid.util.ConcurrentLinkedQueueAtomicSize<E>
org.apache.qpid.util.ConcurrentLinkedMessageQueueAtomicSize<E>
- All Implemented Interfaces:
- Serializable, Iterable<E>, Collection<E>, Queue<E>, MessageQueue<E>
public class ConcurrentLinkedMessageQueueAtomicSize<E>
- extends ConcurrentLinkedQueueAtomicSize<E>
- implements MessageQueue<E>
- See Also:
- Serialized Form
_messageHead
protected Queue<E> _messageHead
_messageHeadSize
protected AtomicInteger _messageHeadSize
ConcurrentLinkedMessageQueueAtomicSize
public ConcurrentLinkedMessageQueueAtomicSize()
size
public int size()
- Specified by:
size
in interface Collection<E>
- Overrides:
size
in class ConcurrentLinkedQueueAtomicSize<E>
headSize
public int headSize()
poll
public E poll()
- Specified by:
poll
in interface Queue<E>
- Overrides:
poll
in class ConcurrentLinkedQueueAtomicSize<E>
remove
public boolean remove(Object o)
- Specified by:
remove
in interface Collection<E>
- Overrides:
remove
in class ConcurrentLinkedQueueAtomicSize<E>
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interface Collection<E>
- Overrides:
removeAll
in class AbstractCollection<E>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Collection<E>
- Overrides:
isEmpty
in class ConcurrentLinkedQueue<E>
clear
public void clear()
- Specified by:
clear
in interface Collection<E>
- Overrides:
clear
in class AbstractQueue<E>
contains
public boolean contains(Object o)
- Specified by:
contains
in interface Collection<E>
- Overrides:
contains
in class ConcurrentLinkedQueue<E>
containsAll
public boolean containsAll(Collection<?> o)
- Specified by:
containsAll
in interface Collection<E>
- Overrides:
containsAll
in class AbstractCollection<E>
element
public E element()
- Specified by:
element
in interface Queue<E>
- Overrides:
element
in class AbstractQueue<E>
peek
public E peek()
- Specified by:
peek
in interface Queue<E>
- Overrides:
peek
in class ConcurrentLinkedQueue<E>
iterator
public Iterator<E> iterator()
- Specified by:
iterator
in interface Iterable<E>
- Specified by:
iterator
in interface Collection<E>
- Overrides:
iterator
in class ConcurrentLinkedQueue<E>
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll
in interface Collection<E>
- Overrides:
retainAll
in class AbstractCollection<E>
toArray
public Object[] toArray()
- Specified by:
toArray
in interface Collection<E>
- Overrides:
toArray
in class ConcurrentLinkedQueue<E>
pushHead
public boolean pushHead(E o)
- Description copied from interface:
MessageQueue
- Inserts the specified element into this queue, if possible. When using queues that may impose insertion
restrictions (for example capacity bounds), method offer is generally preferable to method Collection.add(E),
which can fail to insert an element only by throwing an exception.
- Specified by:
pushHead
in interface MessageQueue<E>
- Parameters:
o
- The element to insert.
- Returns:
- true if it was possible to add the element to this queue, else false
Licensed to the Apache Software Foundation