Interface HeapPriorityQueue.HeapPriorityQueueElement
-
- All Known Implementing Classes:
LongWatermarkCombiner.LongWatermarkElement,StatusWatermarkValve.SubpartitionStatus
- Enclosing class:
- HeapPriorityQueue<T extends HeapPriorityQueue.HeapPriorityQueueElement>
public static interface HeapPriorityQueue.HeapPriorityQueueElementInterface for objects that can be managed by aHeapPriorityQueue. Such an object can only be contained in at most oneHeapPriorityQueueat a time.
-
-
Field Summary
Fields Modifier and Type Field Description static intNOT_CONTAINEDThe index that indicates that aHeapPriorityQueue.HeapPriorityQueueElementobject is not contained in and managed by anyHeapPriorityQueue.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetInternalIndex()Returns the current index of this object in the internal array ofHeapPriorityQueue.voidsetInternalIndex(int newIndex)Sets the current index of this object in theHeapPriorityQueueand should only be called by the owningHeapPriorityQueue.
-
-
-
Field Detail
-
NOT_CONTAINED
static final int NOT_CONTAINED
The index that indicates that aHeapPriorityQueue.HeapPriorityQueueElementobject is not contained in and managed by anyHeapPriorityQueue. We do not strictly enforce that internal indexes must be reset to this value when elements are removed from aHeapPriorityQueue.- See Also:
- Constant Field Values
-
-
Method Detail
-
getInternalIndex
int getInternalIndex()
Returns the current index of this object in the internal array ofHeapPriorityQueue.
-
setInternalIndex
void setInternalIndex(int newIndex)
Sets the current index of this object in theHeapPriorityQueueand should only be called by the owningHeapPriorityQueue.- Parameters:
newIndex- the new index in the timer heap.
-
-