public class TaskQueue<R extends Runnable> extends LinkedBlockingQueue<Runnable>
| Constructor and Description |
|---|
TaskQueue(int capacity) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
offer(Runnable runnable) |
boolean |
retryOffer(Runnable o,
long timeout,
TimeUnit unit)
retry offer task
|
void |
setExecutor(EagerThreadPoolExecutor exec) |
clear, contains, drainTo, drainTo, iterator, offer, peek, poll, poll, put, remainingCapacity, remove, size, spliterator, take, toArray, toArray, toStringadd, addAll, element, removecontainsAll, isEmpty, removeAll, retainAllequals, getClass, hashCode, notify, notifyAll, wait, wait, waitaddaddAll, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, streampublic void setExecutor(EagerThreadPoolExecutor exec)
public boolean offer(Runnable runnable)
offer in interface BlockingQueue<Runnable>offer in interface Queue<Runnable>offer in class LinkedBlockingQueue<Runnable>public boolean retryOffer(Runnable o, long timeout, TimeUnit unit) throws InterruptedException
o - taskRejectedExecutionException - if executor is terminated.InterruptedExceptionCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.