public class TaskQueue extends LinkedBlockingQueue<Runnable>
Modifier and Type | Field and Description |
---|---|
protected static StringManager |
sm |
Constructor and Description |
---|
TaskQueue() |
TaskQueue(Collection<? extends Runnable> c) |
TaskQueue(int capacity) |
Modifier and Type | Method and Description |
---|---|
boolean |
force(Runnable o) |
boolean |
force(Runnable o,
long timeout,
TimeUnit unit) |
boolean |
offer(Runnable o) |
Runnable |
poll(long timeout,
TimeUnit unit) |
int |
remainingCapacity() |
void |
setForcedRemainingCapacity(int forcedRemainingCapacity) |
void |
setParent(ThreadPoolExecutor tp) |
Runnable |
take() |
clear, contains, drainTo, drainTo, iterator, offer, peek, poll, put, remove, size, toArray, toArray, toString
add, addAll, element, remove
containsAll, isEmpty, removeAll, retainAll
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add
addAll, containsAll, equals, hashCode, isEmpty, removeAll, retainAll
protected static final StringManager sm
public TaskQueue()
public TaskQueue(int capacity)
public TaskQueue(Collection<? extends Runnable> c)
public void setParent(ThreadPoolExecutor tp)
public boolean force(Runnable o)
public boolean force(Runnable o, long timeout, TimeUnit unit) throws InterruptedException
InterruptedException
public boolean offer(Runnable o)
offer
in interface BlockingQueue<Runnable>
offer
in interface Queue<Runnable>
offer
in class LinkedBlockingQueue<Runnable>
public Runnable poll(long timeout, TimeUnit unit) throws InterruptedException
poll
in interface BlockingQueue<Runnable>
poll
in class LinkedBlockingQueue<Runnable>
InterruptedException
public Runnable take() throws InterruptedException
take
in interface BlockingQueue<Runnable>
take
in class LinkedBlockingQueue<Runnable>
InterruptedException
public int remainingCapacity()
remainingCapacity
in interface BlockingQueue<Runnable>
remainingCapacity
in class LinkedBlockingQueue<Runnable>
public void setForcedRemainingCapacity(int forcedRemainingCapacity)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.