Serializable, Iterable<E>, Collection<E>, BlockingQueue<E>, Queue<E>public class CoDelBlockingQueue<E extends CDQEntry> extends LinkedBlockingQueue<E>
| Constructor | Description |
|---|---|
CoDelBlockingQueue(I2PAppContext ctx,
String name,
int capacity) |
| Modifier and Type | Method | 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() |
containsAll, isEmptyaddAll, element, removeaddAll, containsAll, equals, hashCode, isEmpty, parallelStream, streamcontains, forEach, iterator, peek, poll, remainingCapacity, remove, removeAll, removeIf, retainAll, size, spliterator, toArray, toArray, toStringpublic 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>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()