Class RoundRobinBlockingQueue<E>
- java.lang.Object
-
- org.eclipse.net4j.util.collection.RoundRobinBlockingQueue<E>
-
- All Implemented Interfaces:
java.lang.Iterable<E>,java.util.Collection<E>,java.util.concurrent.BlockingQueue<E>,java.util.Queue<E>
public class RoundRobinBlockingQueue<E> extends java.lang.Object implements java.util.concurrent.BlockingQueue<E>- Since:
- 3.1
- Author:
- Eike Stepper
-
-
Constructor Summary
Constructors Constructor Description RoundRobinBlockingQueue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(E o)booleanaddAll(java.util.Collection<? extends E> c)voidclear()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)intdrainTo(java.util.Collection<? super E> c)intdrainTo(java.util.Collection<? super E> c, int maxElements)Eelement()booleanisEmpty()java.util.Iterator<E>iterator()booleanoffer(E e)booleanoffer(E o, long timeout, java.util.concurrent.TimeUnit unit)Epeek()Epoll()Epoll(long timeout, java.util.concurrent.TimeUnit unit)voidput(E o)intremainingCapacity()Eremove()booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)intsize()Etake()java.lang.Object[]toArray()<T> T[]toArray(T[] array)java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
remainingCapacity
public int remainingCapacity()
- Specified by:
remainingCapacityin interfacejava.util.concurrent.BlockingQueue<E>
-
size
public int size()
- Specified by:
sizein interfacejava.util.Collection<E>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Collection<E>
-
offer
public boolean offer(E e)
-
offer
public boolean offer(E o, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
- Specified by:
offerin interfacejava.util.concurrent.BlockingQueue<E>- Throws:
java.lang.InterruptedException
-
put
public void put(E o) throws java.lang.InterruptedException
- Specified by:
putin interfacejava.util.concurrent.BlockingQueue<E>- Throws:
java.lang.InterruptedException
-
add
public boolean add(E o)
-
poll
public E poll(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
- Specified by:
pollin interfacejava.util.concurrent.BlockingQueue<E>- Throws:
java.lang.InterruptedException
-
take
public E take() throws java.lang.InterruptedException
- Specified by:
takein interfacejava.util.concurrent.BlockingQueue<E>- Throws:
java.lang.InterruptedException
-
remove
public boolean remove(java.lang.Object o)
-
clear
public void clear()
- Specified by:
clearin interfacejava.util.Collection<E>
-
iterator
public java.util.Iterator<E> iterator()
-
contains
public boolean contains(java.lang.Object o)
-
toArray
public java.lang.Object[] toArray()
- Specified by:
toArrayin interfacejava.util.Collection<E>
-
toArray
public <T> T[] toArray(T[] array)
- Specified by:
toArrayin interfacejava.util.Collection<E>
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAllin interfacejava.util.Collection<E>
-
addAll
public boolean addAll(java.util.Collection<? extends E> c)
- Specified by:
addAllin interfacejava.util.Collection<E>
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAllin interfacejava.util.Collection<E>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAllin interfacejava.util.Collection<E>
-
drainTo
public int drainTo(java.util.Collection<? super E> c)
- Specified by:
drainToin interfacejava.util.concurrent.BlockingQueue<E>
-
drainTo
public int drainTo(java.util.Collection<? super E> c, int maxElements)
- Specified by:
drainToin interfacejava.util.concurrent.BlockingQueue<E>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-