public class TaskQueue extends VariableLinkedBlockingQueue<Runnable>
| 构造器和说明 |
|---|
TaskQueue(int queueCapacity) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
force(Runnable o,
long timeout,
TimeUnit unit)
Force offer task
|
boolean |
offer(Runnable runnable) |
void |
setExecutor(EagerDtpExecutor exec) |
clear, drainTo, drainTo, iterator, offer, peek, poll, poll, put, remainingCapacity, remove, setCapacity, size, take, toArray, toArray, toStringadd, addAll, element, removecontains, containsAll, isEmpty, removeAll, retainAllclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, containsaddAll, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, spliterator, streampublic void setExecutor(EagerDtpExecutor exec)
public boolean offer(@NonNull
Runnable runnable)
offer 在接口中 BlockingQueue<Runnable>offer 在接口中 Queue<Runnable>offer 在类中 VariableLinkedBlockingQueue<Runnable>public boolean force(Runnable o, long timeout, TimeUnit unit) throws InterruptedException
o - tasktimeout - timeoutunit - unitRejectedExecutionException - if executor is terminated.InterruptedException - if interrupted while waiting.Copyright © 2023. All rights reserved.