public class PriorityQueueScheduler extends AbstractQueueScheduler
Jobs with higher priority will be processed first.
| Constructor and Description |
|---|
PriorityQueueScheduler() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Request r,
Handleable h,
Priority p,
Priority pf)
Adds a request to the queue.
|
boolean |
offer(Job job,
long timeout,
TimeUnit unit) |
void |
put(Job job) |
add, add, add, add, add, close, drainTo, drainTo, iterator, offer, peek, poll, poll, remainingCapacity, size, takecontains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, contains, removeaddAll, clear, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArraypublic final void add(Request r, Handleable h, Priority p, Priority pf)
SchedulerThis request would be parsed by the handler specified, and its priority can be downgraded to a minimum priority specified.
r - request to fetch when dequeuedh - handler to be used to parse the requestp - initial priority of the requestpf - the minimum (floor) priority of this requestCopyright © 2018. All rights reserved.