@InterfaceAudience.Private public class StealJobQueue<T> extends PriorityBlockingQueue<T>
| Modifier and Type | Field and Description | 
|---|---|
| private Lock | lock | 
| private Condition | notEmpty | 
| private static long | serialVersionUID | 
| private BlockingQueue<T> | stealFromQueue | 
| Constructor and Description | 
|---|
| StealJobQueue(Comparator<? super T> comparator) | 
| StealJobQueue(int initCapacity,
             int stealFromQueueInitCapacity,
             Comparator<? super T> comparator) | 
| Modifier and Type | Method and Description | 
|---|---|
| BlockingQueue<T> | getStealFromQueue()Get a queue whose job might be stolen by the consumer of this original queue | 
| boolean | offer(T t) | 
| T | poll(long timeout,
    TimeUnit unit) | 
| T | take() | 
add, clear, comparator, contains, drainTo, drainTo, iterator, offer, peek, poll, put, remainingCapacity, remove, size, spliterator, toArray, toArray, toStringaddAll, element, removecontainsAll, isEmpty, removeAll, retainAllclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAll, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, streamprivate static final long serialVersionUID
private BlockingQueue<T> stealFromQueue
public StealJobQueue(Comparator<? super T> comparator)
public StealJobQueue(int initCapacity, int stealFromQueueInitCapacity, Comparator<? super T> comparator)
public BlockingQueue<T> getStealFromQueue()
public boolean offer(T t)
offer in interface BlockingQueue<T>offer in interface Queue<T>offer in class PriorityBlockingQueue<T>public T take() throws InterruptedException
take in interface BlockingQueue<T>take in class PriorityBlockingQueue<T>InterruptedExceptionpublic T poll(long timeout, TimeUnit unit) throws InterruptedException
poll in interface BlockingQueue<T>poll in class PriorityBlockingQueue<T>InterruptedExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.