@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, toString
addAll, element, remove
containsAll, isEmpty, removeAll, retainAll
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAll, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, stream
private 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>
InterruptedException
public T poll(long timeout, TimeUnit unit) throws InterruptedException
poll
in interface BlockingQueue<T>
poll
in class PriorityBlockingQueue<T>
InterruptedException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.