private static class TransportFilter.QueuingExecutor.HandOffQueue
extends java.util.concurrent.SynchronousQueue<java.lang.Runnable>
taskQueue
before it blocks waiting for new tasks to be submitted.
It is passed to ThreadPoolExecutor
, where it is used used to hand off tasks from task-submitting
thread to worker threads.Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
private java.util.Queue<java.lang.Runnable> |
taskQueue |
private boolean |
threadSafeQueue |
Modifier | Constructor and Description |
---|---|
private |
HandOffQueue(java.util.Queue<java.lang.Runnable> taskQueue,
boolean threadSafeQueue) |
Modifier and Type | Method and Description |
---|---|
java.lang.Runnable |
poll(long timeout,
java.util.concurrent.TimeUnit unit) |
java.lang.Runnable |
take() |
clear, contains, containsAll, drainTo, drainTo, isEmpty, iterator, offer, offer, peek, poll, put, remainingCapacity, remove, removeAll, retainAll, size, spliterator, toArray, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
private static final long serialVersionUID
private final java.util.Queue<java.lang.Runnable> taskQueue
private final boolean threadSafeQueue
private HandOffQueue(java.util.Queue<java.lang.Runnable> taskQueue, boolean threadSafeQueue)
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.SynchronousQueue<java.lang.Runnable>
java.lang.InterruptedException
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.SynchronousQueue<java.lang.Runnable>
java.lang.InterruptedException