Class IndexedPriorityQueue<E>
java.lang.Object
io.trino.execution.resourcegroups.IndexedPriorityQueue<E>
- All Implemented Interfaces:
Iterable<E>
A priority queue with constant time contains(E) and log time remove(E)
Ties are broken by insertion order
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionIndexedPriorityQueue(IndexedPriorityQueue.PriorityOrdering priorityOrdering) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddOrUpdate(E element, long priority) booleangetPrioritized(E element) booleanisEmpty()iterator()peek()io.trino.execution.resourcegroups.IndexedPriorityQueue.Entry<E> poll()booleanintsize()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
IndexedPriorityQueue
public IndexedPriorityQueue() -
IndexedPriorityQueue
-
-
Method Details