public class FIFOScheduler extends AbstractQueueScheduler
Jobs in queue will be processed first in order of insertion.
Constructor and Description |
---|
FIFOScheduler() |
Modifier and Type | Method and Description |
---|---|
void |
add(@NotNull Request r,
@NotNull 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, drainTo, drainTo, iterator, offer, peek, poll, poll, remainingCapacity, size, take
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add, contains, remove
addAll, clear, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArray
public final void add(@NotNull @NotNull Request r, @NotNull @NotNull Handleable h, Priority p, Priority pf)
Scheduler
This 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 requestpublic final void put(@Nonnull Job job) throws InterruptedException
InterruptedException
public final boolean offer(Job job, long timeout, @Nonnull TimeUnit unit) throws InterruptedException
InterruptedException
Copyright © 2018. All rights reserved.