Package org.apache.ignite.internal.util
Class GridBoundedPriorityQueue<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractQueue<E>
-
- java.util.PriorityQueue<E>
-
- org.apache.ignite.internal.util.GridBoundedPriorityQueue<E>
-
- Type Parameters:
E- Type of the queue element.
- All Implemented Interfaces:
Serializable,Iterable<E>,Collection<E>,Queue<E>
public class GridBoundedPriorityQueue<E> extends PriorityQueue<E>
Bounded variant ofPriorityQueue.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GridBoundedPriorityQueue(int maxCap, Comparator<? super E> cmp)Creates a bounded priority queue with the specified maximum size.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanoffer(E e)-
Methods inherited from class java.util.PriorityQueue
add, clear, comparator, contains, forEach, iterator, peek, poll, remove, removeAll, removeIf, retainAll, size, spliterator, toArray, toArray
-
Methods inherited from class java.util.AbstractQueue
addAll, element, remove
-
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
containsAll, equals, hashCode, isEmpty, parallelStream, stream, toArray
-
-
-
-
Constructor Detail
-
GridBoundedPriorityQueue
public GridBoundedPriorityQueue(int maxCap, Comparator<? super E> cmp)Creates a bounded priority queue with the specified maximum size. At mostmaxCapelements would be kept in the queue.- Parameters:
maxCap- Maximum size of the queue.cmp- Comparator that orders the elements.
-
-