Class ContainerBlockingQueue<E>
- java.lang.Object
-
- org.eclipse.net4j.util.event.Notifier
-
- org.eclipse.net4j.util.container.delegate.AbstractDelegator<E>
-
- org.eclipse.net4j.util.container.delegate.ContainerCollection<E>
-
- org.eclipse.net4j.util.container.delegate.ContainerQueue<E>
-
- org.eclipse.net4j.util.container.delegate.ContainerBlockingQueue<E>
-
- All Implemented Interfaces:
java.lang.Iterable<E>,java.util.Collection<E>,java.util.concurrent.BlockingQueue<E>,java.util.Queue<E>,IContainerBlockingQueue<E>,IContainerCollection<E>,IContainerQueue<E>,IContainer<E>,INotifier,INotifier.INotifier2
public class ContainerBlockingQueue<E> extends ContainerQueue<E> implements IContainerBlockingQueue<E>
A default implementation of acontainer blocking queue.- Author:
- Eike Stepper
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.net4j.util.container.delegate.AbstractDelegator
AbstractDelegator.DelegatingIterator
-
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer
IContainer.Modifiable<E>, IContainer.Persistable<E>, IContainer.Persistence<E>
-
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
INotifier.INotifier2
-
-
Constructor Summary
Constructors Constructor Description ContainerBlockingQueue(java.util.concurrent.BlockingQueue<E> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdrainTo(java.util.Collection<? super E> c)intdrainTo(java.util.Collection<? super E> c, int maxElements)java.util.concurrent.BlockingQueue<E>getDelegate()booleanoffer(E o, long timeout, java.util.concurrent.TimeUnit unit)Epoll(long timeout, java.util.concurrent.TimeUnit unit)voidput(E o)intremainingCapacity()Etake()-
Methods inherited from class org.eclipse.net4j.util.container.delegate.ContainerQueue
element, offer, peek, poll, remove
-
Methods inherited from class org.eclipse.net4j.util.container.delegate.ContainerCollection
add, addAll, clear, contains, containsAll, equals, getElements, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
-
Methods inherited from class org.eclipse.net4j.util.container.delegate.AbstractDelegator
createEvent, dispatchEvent, fireAddedEvent, fireRemovedEvent
-
Methods inherited from class org.eclipse.net4j.util.event.Notifier
addListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
addAll, clear, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray
-
Methods inherited from interface org.eclipse.net4j.util.container.IContainer
getElements, isEmpty
-
Methods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
-
-
-
-
Constructor Detail
-
ContainerBlockingQueue
public ContainerBlockingQueue(java.util.concurrent.BlockingQueue<E> delegate)
-
-
Method Detail
-
getDelegate
public java.util.concurrent.BlockingQueue<E> getDelegate()
- Specified by:
getDelegatein interfaceIContainerBlockingQueue<E>- Specified by:
getDelegatein interfaceIContainerCollection<E>- Specified by:
getDelegatein interfaceIContainerQueue<E>- Overrides:
getDelegatein classContainerQueue<E>
-
drainTo
public int drainTo(java.util.Collection<? super E> c)
- Specified by:
drainToin interfacejava.util.concurrent.BlockingQueue<E>- Category
- WRITE
-
drainTo
public int drainTo(java.util.Collection<? super E> c, int maxElements)
- Specified by:
drainToin interfacejava.util.concurrent.BlockingQueue<E>- Category
- WRITE
-
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- Category
- WRITE
-
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- Category
- WRITE
-
put
public void put(E o) throws java.lang.InterruptedException
- Specified by:
putin interfacejava.util.concurrent.BlockingQueue<E>- Throws:
java.lang.InterruptedException- Category
- WRITE
-
remainingCapacity
public int remainingCapacity()
- Specified by:
remainingCapacityin interfacejava.util.concurrent.BlockingQueue<E>- Category
- READ
-
-