public abstract class PriorityQueueAbstractScheduler<R extends RequestHolder,P extends Enum<? extends Priority>> extends AbstractQueue<R> implements Scheduler<R,P>, BlockingQueue<R>
| Constructor and Description |
|---|
PriorityQueueAbstractScheduler() |
| Modifier and Type | Method and Description |
|---|---|
int |
drainTo(Collection<? super R> c) |
int |
drainTo(Collection<? super R> c,
int maxElements) |
protected PriorityBlockingQueue<R> |
getQueue() |
Iterator<R> |
iterator() |
boolean |
offer(R r) |
boolean |
offer(R r,
long timeout,
TimeUnit unit) |
R |
peek() |
R |
poll() |
R |
poll(long timeout,
TimeUnit unit) |
void |
put(R r) |
int |
remainingCapacity() |
int |
size() |
R |
take() |
contains, 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, toArrayprotected PriorityBlockingQueue<R> getQueue()
@Nonnull public Iterator<R> iterator()
iterator in interface Iterable<R extends RequestHolder>iterator in interface Collection<R extends RequestHolder>iterator in class AbstractCollection<R extends RequestHolder>public int size()
size in interface Collection<R extends RequestHolder>size in class AbstractCollection<R extends RequestHolder>public void put(R r)
put in interface BlockingQueue<R extends RequestHolder>public boolean offer(R r, long timeout, @Nonnull TimeUnit unit)
offer in interface BlockingQueue<R extends RequestHolder>public R take() throws InterruptedException
take in interface BlockingQueue<R extends RequestHolder>InterruptedExceptionpublic R poll(long timeout, @Nonnull TimeUnit unit) throws InterruptedException
poll in interface BlockingQueue<R extends RequestHolder>InterruptedExceptionpublic int remainingCapacity()
remainingCapacity in interface BlockingQueue<R extends RequestHolder>public int drainTo(@Nonnull Collection<? super R> c)
drainTo in interface BlockingQueue<R extends RequestHolder>public int drainTo(@Nonnull Collection<? super R> c, int maxElements)
drainTo in interface BlockingQueue<R extends RequestHolder>public boolean offer(@Nonnull R r)
offer in interface BlockingQueue<R extends RequestHolder>offer in interface Queue<R extends RequestHolder>public R poll()
poll in interface Queue<R extends RequestHolder>public R peek()
peek in interface Queue<R extends RequestHolder>Copyright © 2018. All rights reserved.