Package deltix.data.stream.pq
Class PriorityQueueExt<T>
- java.lang.Object
-
- deltix.data.stream.pq.PriorityQueueExt<T>
-
@ParametersAreNonnullByDefault public final class PriorityQueueExt<T> extends java.lang.ObjectBinary heap-based priority queue.Optimizations (compared to
PriorityQueueExt):- We not extract keys from objects when comparing them. Instead we store keys in separate array.
- When root removed, we don't update tree structure immediately. Instead we mark that root is missing and update structure
-
-
Constructor Summary
Constructors Constructor Description PriorityQueueExt(int capacity, boolean ascending)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()voiddump(java.io.PrintStream ps)voiddump(java.io.PrintStream ps, java.lang.String indent, int pos)booleanisEmpty()voidoffer(T obj, long objKey)longpeekKey()Tpoll()booleanremove(T obj)intsize()
-
-
-
Method Detail
-
dump
public void dump(java.io.PrintStream ps)
-
dump
public void dump(java.io.PrintStream ps, java.lang.String indent, int pos)
-
clear
public void clear()
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
offer
public void offer(T obj, long objKey)
-
remove
public boolean remove(T obj)
-
poll
@Nullable public T poll()
-
peekKey
public long peekKey()
- Returns:
- returns current key of root.
-
-