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:
Iterable<E>
,Collection<E>
,BlockingQueue<E>
,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 a
container 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
-
Method Summary
Modifier and TypeMethodDescriptionint
drainTo
(Collection<? super E> c) int
drainTo
(Collection<? super E> c, int maxElements) boolean
void
int
take()
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.concurrent.BlockingQueue
add, contains, offer, remove
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 Details
-
ContainerBlockingQueue
-
-
Method Details
-
getDelegate
- Specified by:
getDelegate
in interfaceIContainerBlockingQueue<E>
- Specified by:
getDelegate
in interfaceIContainerCollection<E>
- Specified by:
getDelegate
in interfaceIContainerQueue<E>
- Overrides:
getDelegate
in classContainerQueue<E>
-
drainTo
- Specified by:
drainTo
in interfaceBlockingQueue<E>
- Category
- WRITE
-
drainTo
- Specified by:
drainTo
in interfaceBlockingQueue<E>
- Category
- WRITE
-
offer
- Specified by:
offer
in interfaceBlockingQueue<E>
- Throws:
InterruptedException
- Category
- WRITE
-
poll
- Specified by:
poll
in interfaceBlockingQueue<E>
- Throws:
InterruptedException
- Category
- WRITE
-
put
- Specified by:
put
in interfaceBlockingQueue<E>
- Throws:
InterruptedException
- Category
- WRITE
-
remainingCapacity
public int remainingCapacity()- Specified by:
remainingCapacity
in interfaceBlockingQueue<E>
- Category
- READ
-
take
- Specified by:
take
in interfaceBlockingQueue<E>
- Throws:
InterruptedException
- Category
- WRITE
-