Interface HeapPriorityQueueElement
- All Known Implementing Classes:
AbstractHeapPriorityQueueElement,SourceCoordinator.WatermarkElement,TimerHeapInternalTimer
@Internal
public interface HeapPriorityQueueElement
Interface for objects that can be managed by a
HeapPriorityQueue. Such an object can only
be contained in at most one HeapPriorityQueue at a time.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe index that indicates that aHeapPriorityQueueElementobject is not contained in and managed by anyHeapPriorityQueue. -
Method Summary
Modifier and TypeMethodDescriptionintReturns 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 Details
-
NOT_CONTAINED
static final int NOT_CONTAINEDThe index that indicates that aHeapPriorityQueueElementobject 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:
-
-
Method Details
-
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.
-