public abstract class BytesBoundedLinkedQueue<E> extends AbstractQueue<E> implements BlockingQueue<E>
Constructor and Description |
---|
BytesBoundedLinkedQueue(long capacity) |
Modifier and Type | Method and Description |
---|---|
int |
drainTo(Collection<? super E> c) |
int |
drainTo(Collection<? super E> c,
int maxElements) |
void |
elementAdded(E e) |
void |
elementRemoved(E e) |
abstract long |
getBytesSize(E e) |
Iterator<E> |
iterator() |
boolean |
offer(E e) |
boolean |
offer(E e,
long timeout,
TimeUnit unit) |
E |
peek() |
E |
poll() |
E |
poll(long timeout,
TimeUnit unit) |
void |
put(E e) |
int |
remainingCapacity() |
int |
size() |
E |
take() |
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add, contains, remove
public abstract long getBytesSize(E e)
public void elementAdded(E e)
public void elementRemoved(E e)
public int size()
size
in interface Collection<E>
size
in class AbstractCollection<E>
public void put(E e) throws InterruptedException
put
in interface BlockingQueue<E>
InterruptedException
public boolean offer(E e, long timeout, TimeUnit unit) throws InterruptedException
offer
in interface BlockingQueue<E>
InterruptedException
public E take() throws InterruptedException
take
in interface BlockingQueue<E>
InterruptedException
public int remainingCapacity()
remainingCapacity
in interface BlockingQueue<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 e)
public E poll(long timeout, TimeUnit unit) throws InterruptedException
poll
in interface BlockingQueue<E>
InterruptedException
Copyright © 2011–2015. All rights reserved.