public class CoDelBlockingQueue<E extends CDQEntry> extends LinkedBlockingQueue<E>
| Constructor and Description |
|---|
CoDelBlockingQueue(net.i2p.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, spliterator, toArray, toArray, toStringaddAll, element, removecontainsAll, isEmpty, removeAll, retainAllclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAll, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, streampublic CoDelBlockingQueue(net.i2p.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>InterruptedExceptionpublic void put(E o) throws InterruptedException
put in interface BlockingQueue<E extends CDQEntry>put in class LinkedBlockingQueue<E extends CDQEntry>InterruptedExceptionpublic 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>InterruptedExceptionpublic 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()