public class CoDelBlockingQueue<E extends CDQEntry> extends LinkedBlockingQueue<E>
Constructor and Description |
---|
CoDelBlockingQueue(I2PAppContext ctx,
String name,
int capacity) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E o) |
void |
clear() |
int |
drainAllTo(Collection<? super E> c)
Drains all, without updating stats or dropping.
|
int |
drainTo(Collection<? super E> c)
Updates stats and possibly drops while draining.
|
int |
drainTo(Collection<? super E> c,
int maxElements)
Updates stats and possibly drops while draining.
|
boolean |
isBacklogged()
Has the head of the queue been waiting too long,
or is the queue almost full?
|
boolean |
offer(E o) |
boolean |
offer(E o,
long timeout,
TimeUnit unit) |
E |
poll() |
void |
put(E o) |
E |
take() |
contains, iterator, peek, poll, remainingCapacity, remove, size, toArray, toArray, toString
addAll, element, remove
containsAll, isEmpty, removeAll, retainAll
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAll, containsAll, equals, hashCode, isEmpty, removeAll, retainAll
public CoDelBlockingQueue(I2PAppContext ctx, String name, int capacity)
name
- for statspublic boolean add(E o)
public boolean offer(E o)
public boolean offer(E o, long timeout, TimeUnit unit) throws InterruptedException
offer
in interface BlockingQueue<E extends CDQEntry>
offer
in class LinkedBlockingQueue<E extends CDQEntry>
InterruptedException
public void put(E o) throws InterruptedException
put
in interface BlockingQueue<E extends CDQEntry>
put
in class LinkedBlockingQueue<E extends CDQEntry>
InterruptedException
public void clear()
clear
in interface Collection<E extends CDQEntry>
clear
in class LinkedBlockingQueue<E extends CDQEntry>
public E take() throws InterruptedException
take
in interface BlockingQueue<E extends CDQEntry>
take
in class LinkedBlockingQueue<E extends CDQEntry>
InterruptedException
public E poll()
public int drainTo(Collection<? super E> c)
drainTo
in interface BlockingQueue<E extends CDQEntry>
drainTo
in class LinkedBlockingQueue<E extends CDQEntry>
public int drainTo(Collection<? super E> c, int maxElements)
drainTo
in interface BlockingQueue<E extends CDQEntry>
drainTo
in class LinkedBlockingQueue<E extends CDQEntry>
public int drainAllTo(Collection<? super E> c)
public boolean isBacklogged()