public class TaskQueue
extends java.util.concurrent.LinkedBlockingQueue<java.lang.Runnable>
Constructor and Description |
---|
TaskQueue() |
TaskQueue(java.util.Collection<? extends java.lang.Runnable> c) |
TaskQueue(int capacity) |
Modifier and Type | Method and Description |
---|---|
boolean |
force(java.lang.Runnable o) |
boolean |
force(java.lang.Runnable o,
long timeout,
java.util.concurrent.TimeUnit unit) |
boolean |
offer(java.lang.Runnable o) |
java.lang.Runnable |
poll(long timeout,
java.util.concurrent.TimeUnit unit) |
int |
remainingCapacity() |
void |
setForcedRemainingCapacity(java.lang.Integer forcedRemainingCapacity) |
void |
setParent(ThreadPoolExecutor tp) |
java.lang.Runnable |
take() |
clear, contains, drainTo, drainTo, iterator, offer, peek, poll, put, remove, size, toArray, toArray, toString
containsAll, isEmpty, removeAll, retainAll
public TaskQueue()
public TaskQueue(int capacity)
public TaskQueue(java.util.Collection<? extends java.lang.Runnable> c)
public void setParent(ThreadPoolExecutor tp)
public boolean force(java.lang.Runnable o)
public boolean force(java.lang.Runnable o, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
java.lang.InterruptedException
public boolean offer(java.lang.Runnable o)
offer
in interface java.util.concurrent.BlockingQueue<java.lang.Runnable>
offer
in interface java.util.Queue<java.lang.Runnable>
offer
in class java.util.concurrent.LinkedBlockingQueue<java.lang.Runnable>
public java.lang.Runnable poll(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
poll
in interface java.util.concurrent.BlockingQueue<java.lang.Runnable>
poll
in class java.util.concurrent.LinkedBlockingQueue<java.lang.Runnable>
java.lang.InterruptedException
public java.lang.Runnable take() throws java.lang.InterruptedException
take
in interface java.util.concurrent.BlockingQueue<java.lang.Runnable>
take
in class java.util.concurrent.LinkedBlockingQueue<java.lang.Runnable>
java.lang.InterruptedException
public int remainingCapacity()
remainingCapacity
in interface java.util.concurrent.BlockingQueue<java.lang.Runnable>
remainingCapacity
in class java.util.concurrent.LinkedBlockingQueue<java.lang.Runnable>
public void setForcedRemainingCapacity(java.lang.Integer forcedRemainingCapacity)
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.