Class TransportFilter.QueuingExecutor.HandOffQueue
java.lang.Object
java.util.AbstractCollection<Runnable>
java.util.AbstractQueue<Runnable>
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 longprivate final boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateHandOffQueue(Queue<Runnable> taskQueue, boolean threadSafeQueue) -
Method Summary
Methods inherited from class SynchronousQueue
clear, contains, containsAll, drainTo, drainTo, isEmpty, iterator, offer, offer, peek, poll, put, remainingCapacity, remove, removeAll, retainAll, size, spliterator, toArray, toArray, toStringMethods inherited from class AbstractQueue
add, addAll, element, removeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface BlockingQueue
addMethods inherited from interface 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:
takein interfaceBlockingQueue<Runnable>- Overrides:
takein classSynchronousQueue<Runnable>- Throws:
InterruptedException
-
poll
- Specified by:
pollin interfaceBlockingQueue<Runnable>- Overrides:
pollin classSynchronousQueue<Runnable>- Throws:
InterruptedException
-