org.eclipse.net4j.util.collection
Class RoundRobinBlockingQueue<E>

java.lang.Object
  extended by org.eclipse.net4j.util.collection.RoundRobinBlockingQueue<E>
All Implemented Interfaces:
Iterable<E>, Collection<E>, BlockingQueue<E>, Queue<E>

public class RoundRobinBlockingQueue<E>
extends Object
implements BlockingQueue<E>

Since:
3.1

Constructor Summary
RoundRobinBlockingQueue()
           
 
Method Summary
 boolean add(E o)
           
 boolean addAll(Collection<? extends E> c)
           
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 int drainTo(Collection<? super E> c)
           
 int drainTo(Collection<? super E> c, int maxElements)
           
 E element()
           
 boolean isEmpty()
           
 Iterator<E> iterator()
           
 boolean offer(E e)
           
 boolean offer(E o, long timeout, TimeUnit unit)
           
 E peek()
           
 E poll()
           
 E poll(long timeout, TimeUnit unit)
           
 void put(E o)
           
 int remainingCapacity()
           
 E remove()
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 int size()
           
 E take()
           
 Object[] toArray()
           
<T> T[]
toArray(T[] array)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

RoundRobinBlockingQueue

public RoundRobinBlockingQueue()
Method Detail

remainingCapacity

public int remainingCapacity()
Specified by:
remainingCapacity in interface BlockingQueue<E>

size

public int size()
Specified by:
size in interface Collection<E>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<E>

offer

public boolean offer(E e)
Specified by:
offer in interface BlockingQueue<E>
Specified by:
offer in interface Queue<E>

offer

public boolean offer(E o,
                     long timeout,
                     TimeUnit unit)
              throws InterruptedException
Specified by:
offer in interface BlockingQueue<E>
Throws:
InterruptedException

put

public void put(E o)
         throws InterruptedException
Specified by:
put in interface BlockingQueue<E>
Throws:
InterruptedException

add

public boolean add(E o)
Specified by:
add in interface Collection<E>
Specified by:
add in interface BlockingQueue<E>
Specified by:
add in interface Queue<E>

poll

public E poll(long timeout,
              TimeUnit unit)
       throws InterruptedException
Specified by:
poll in interface BlockingQueue<E>
Throws:
InterruptedException

poll

public E poll()
Specified by:
poll in interface Queue<E>

take

public E take()
       throws InterruptedException
Specified by:
take in interface BlockingQueue<E>
Throws:
InterruptedException

peek

public E peek()
Specified by:
peek in interface Queue<E>

element

public E element()
Specified by:
element in interface Queue<E>

remove

public E remove()
Specified by:
remove in interface Queue<E>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<E>
Specified by:
remove in interface BlockingQueue<E>

clear

public void clear()
Specified by:
clear in interface Collection<E>

iterator

public Iterator<E> iterator()
Specified by:
iterator in interface Iterable<E>
Specified by:
iterator in interface Collection<E>

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<E>
Specified by:
contains in interface BlockingQueue<E>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<E>

toArray

public <T> T[] toArray(T[] array)
Specified by:
toArray in interface Collection<E>

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<E>

addAll

public boolean addAll(Collection<? extends E> c)
Specified by:
addAll in interface Collection<E>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<E>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<E>

drainTo

public int drainTo(Collection<? super E> c)
Specified by:
drainTo in interface BlockingQueue<E>

drainTo

public int drainTo(Collection<? super E> c,
                   int maxElements)
Specified by:
drainTo in interface BlockingQueue<E>

toString

public String toString()
Overrides:
toString in class Object


Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.