public abstract class AbstractQueueScheduler extends AbstractQueue<Job> implements Scheduler, BlockingQueue<Job>
| Constructor and Description |
|---|
AbstractQueueScheduler() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Request r)
Adds a request to the queue.
|
void |
add(Request r,
Handleable h)
Adds a request to the queue.
|
void |
add(Request r,
Handleable h,
Priority p)
Adds a request to the queue.
|
void |
add(Request r,
Priority p)
Adds a request to the queue.
|
void |
add(Request r,
Priority p,
Priority pf)
Adds a request to the queue.
|
int |
drainTo(Collection<? super Job> c) |
int |
drainTo(Collection<? super Job> c,
int maxElements) |
Iterator<Job> |
iterator() |
boolean |
offer(Job job) |
Job |
peek() |
Job |
poll() |
Job |
poll(long timeout,
TimeUnit unit) |
int |
remainingCapacity() |
int |
size() |
Job |
take() |
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, contains, offer, put, removeaddAll, clear, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArraypublic void add(Request r, Handleable h, Priority p)
SchedulerThis request would be parsed by the handler specified, and its priority can be downgraded to the default minimum priority.
public void add(Request r, Handleable h)
SchedulerThis request would be parsed by the handler specified, and it's initialised with default priority that can be downgraded to the default minimum priority.
public void add(Request r, Priority p, Priority pf)
SchedulerThis request would be parsed by a handler defined in Router or otherwise, and its priority can be downgraded to a minimum priority specified.
public void add(Request r, Priority p)
SchedulerThis request would be parsed by a handler defined in Router or otherwise defined, and its priority can be downgraded to the default minimum priority.
public void add(Request r)
SchedulerThis request would be parsed by a handler defined in Router or otherwise defined, and it's initialised with default priority that can be downgraded to the default minimum priority.
@Nonnull public Iterator<Job> iterator()
iterator in interface Iterable<Job>iterator in interface Collection<Job>iterator in class AbstractCollection<Job>public int size()
size in interface Collection<Job>size in class AbstractCollection<Job>@Nonnull public Job take() throws InterruptedException
take in interface BlockingQueue<Job>InterruptedExceptionpublic Job poll(long timeout, @Nonnull TimeUnit unit) throws InterruptedException
poll in interface BlockingQueue<Job>InterruptedExceptionpublic int remainingCapacity()
remainingCapacity in interface BlockingQueue<Job>public int drainTo(@Nonnull Collection<? super Job> c)
drainTo in interface BlockingQueue<Job>public int drainTo(@Nonnull Collection<? super Job> c, int maxElements)
drainTo in interface BlockingQueue<Job>Copyright © 2018. All rights reserved.