Serializable
, Iterable<E>
, Collection<E>
, BlockingQueue<E>
, Queue<E>
CoDelPriorityBlockingQueue
public class PriBlockingQueue<E extends PQEntry> extends PriorityBlockingQueue<E>
Modifier and Type | Field | Description |
---|---|---|
protected I2PAppContext |
_context |
|
protected Log |
_log |
|
protected String |
_name |
|
protected static int |
BACKLOG_SIZE |
|
protected static int |
MAX_SIZE |
|
protected static long[] |
RATES |
Constructor | Description |
---|---|
PriBlockingQueue(I2PAppContext ctx,
String name,
int initialCapacity) |
Bounded queue with a hardcoded failsafe max size,
except when using put(), which is unbounded.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
add(E o) |
Deprecated.
use offer(o)
|
boolean |
isBacklogged() |
Is the queue too big?
|
boolean |
offer(E o) |
Returns false if full
|
boolean |
offer(E o,
long timeout,
TimeUnit unit) |
Deprecated.
use offer(o)
|
void |
put(E o) |
Deprecated.
use offer(o)
|
protected void |
timestamp(E o) |
containsAll, isEmpty, removeAll, retainAll
addAll, element, remove
addAll, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, stream
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
clear, comparator, contains, drainTo, drainTo, iterator, peek, poll, poll, remainingCapacity, remove, size, spliterator, take, toArray, toArray, toString
protected final transient I2PAppContext _context
protected final transient Log _log
protected final String _name
protected static final long[] RATES
protected static final int BACKLOG_SIZE
protected static final int MAX_SIZE
public PriBlockingQueue(I2PAppContext ctx, String name, int initialCapacity)
@Deprecated public boolean add(E o)
public boolean offer(E o)
@Deprecated public boolean offer(E o, long timeout, TimeUnit unit)
offer
in interface BlockingQueue<E extends PQEntry>
offer
in class PriorityBlockingQueue<E extends PQEntry>
timeout
- ignoredunit
- ignored@Deprecated public void put(E o)
put
in interface BlockingQueue<E extends PQEntry>
put
in class PriorityBlockingQueue<E extends PQEntry>
public boolean isBacklogged()
protected void timestamp(E o)