public class ContainerBlockingQueue<E> extends ContainerQueue<E> implements IContainerBlockingQueue<E>
container blocking queue
.AbstractDelegator.DelegatingIterator
IContainer.Modifiable<E>, IContainer.Persistable<E>, IContainer.Persistence<E>
Constructor and Description |
---|
ContainerBlockingQueue(BlockingQueue<E> delegate) |
Modifier and Type | Method and Description |
---|---|
int |
drainTo(Collection<? super E> c) |
int |
drainTo(Collection<? super E> c,
int maxElements) |
BlockingQueue<E> |
getDelegate() |
boolean |
offer(E o,
long timeout,
TimeUnit unit) |
E |
poll(long timeout,
TimeUnit unit) |
void |
put(E o) |
int |
remainingCapacity() |
E |
take() |
element, offer, peek, poll, remove
add, addAll, clear, contains, containsAll, equals, getElements, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
createEvent, dispatchEvent, fireAddedEvent, fireRemovedEvent
addListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListener
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getElements, isEmpty
addListener, getListeners, hasListeners, removeListener
add, contains, offer, remove
addAll, clear, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
public ContainerBlockingQueue(BlockingQueue<E> delegate)
public BlockingQueue<E> getDelegate()
getDelegate
in interface IContainerBlockingQueue<E>
getDelegate
in interface IContainerCollection<E>
getDelegate
in interface IContainerQueue<E>
getDelegate
in class ContainerQueue<E>
public int drainTo(Collection<? super E> c)
drainTo
in interface BlockingQueue<E>
public int drainTo(Collection<? super E> c, int maxElements)
drainTo
in interface BlockingQueue<E>
public boolean offer(E o, long timeout, TimeUnit unit) throws InterruptedException
offer
in interface BlockingQueue<E>
InterruptedException
public E poll(long timeout, TimeUnit unit) throws InterruptedException
poll
in interface BlockingQueue<E>
InterruptedException
public void put(E o) throws InterruptedException
put
in interface BlockingQueue<E>
InterruptedException
public int remainingCapacity()
remainingCapacity
in interface BlockingQueue<E>
public E take() throws InterruptedException
take
in interface BlockingQueue<E>
InterruptedException
Copyright (c) 2011-2015 Eike Stepper (Berlin, Germany) and others.