@InterfaceAudience.Private public class StealJobQueue<T> extends PriorityBlockingQueue<T>
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
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–2019 Cloudera. All rights reserved.