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()
Invocations to this method run the anti-starvation (once every interval check).
poll in interface Queue<PriorityDelayQueue.QueueElement<E>>poll in class PriorityDelayQueue<E>protected boolean eligibleToPoll(PriorityDelayQueue.QueueElement<?> element)
This method should be overriden for checking purposes.
element - the element to checkCopyright © 2016 Apache Software Foundation. All rights reserved.