Class TransportFilter.QueuingExecutor.HandOffQueue
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractQueue<E>
java.util.concurrent.SynchronousQueue<Runnable>
org.glassfish.jersey.jdk.connector.internal.TransportFilter.QueuingExecutor.HandOffQueue
- All Implemented Interfaces:
Serializable
,Iterable<Runnable>
,Collection<Runnable>
,BlockingQueue<Runnable>
,Queue<Runnable>
- Enclosing class:
- TransportFilter.QueuingExecutor
private static class TransportFilter.QueuingExecutor.HandOffQueue
extends SynchronousQueue<Runnable>
Synchronous queue that tries to empty
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.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
private final boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
HandOffQueue
(Queue<Runnable> taskQueue, boolean threadSafeQueue) -
Method Summary
Methods inherited from class java.util.concurrent.SynchronousQueue
clear, contains, containsAll, drainTo, drainTo, isEmpty, iterator, offer, offer, peek, poll, put, remainingCapacity, remove, removeAll, retainAll, size, spliterator, toArray, toArray, toString
Methods inherited from class java.util.AbstractQueue
add, addAll, element, remove
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.concurrent.BlockingQueue
add
Methods inherited from interface java.util.Collection
addAll, equals, hashCode, parallelStream, removeIf, stream, toArray
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
taskQueue
-
threadSafeQueue
private final boolean threadSafeQueue
-
-
Constructor Details
-
HandOffQueue
-
-
Method Details
-
take
- Specified by:
take
in interfaceBlockingQueue<Runnable>
- Overrides:
take
in classSynchronousQueue<Runnable>
- Throws:
InterruptedException
-
poll
- Specified by:
poll
in interfaceBlockingQueue<Runnable>
- Overrides:
poll
in classSynchronousQueue<Runnable>
- Throws:
InterruptedException
-