public class PriBlockingQueue<E extends PQEntry> extends PriorityBlockingQueue<E>
Modifier and Type | Field and 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 and 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 and 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) |
clear, comparator, contains, drainTo, drainTo, iterator, peek, poll, poll, remainingCapacity, remove, size, take, 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
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)