public class PollablePriorityDelayQueue<E> extends PriorityDelayQueue<E>
PriorityDelayQueue.QueueElement<E>ANTI_STARVATION_INTERVAL, currentSize, lock, priorities, queues| Constructor and Description |
|---|
PollablePriorityDelayQueue(int priorities,
long maxWait,
TimeUnit unit,
int maxSize) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
eligibleToPoll(PriorityDelayQueue.QueueElement<?> element)
Method for checking the QueueElement eligible to poll before remove it from queue.
|
PriorityDelayQueue.QueueElement<E> |
poll()
Retrieve and remove the head of this queue if it is eligible to poll.
|
add, antiStarvation, clear, debug, drainTo, drainTo, getMaxSize, getMaxWait, getPriorities, iterator, offer, offer, peek, poll, put, remainingCapacity, size, sizes, takeaddAll, element, removecontains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcontains, removeaddAll, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, toArray, toArraypublic PollablePriorityDelayQueue(int priorities, long maxWait, TimeUnit unit, int maxSize)
public PriorityDelayQueue.QueueElement<E> poll()
poll in interface Queue<PriorityDelayQueue.QueueElement<E>>poll in class PriorityDelayQueue<E>protected boolean eligibleToPoll(PriorityDelayQueue.QueueElement<?> element)
element - the element to checkCopyright © 2015 Apache Software Foundation. All Rights Reserved.