Interface HeapPriorityQueueElement
-
- All Known Implementing Classes:
AbstractHeapPriorityQueueElement
,ForStDBCachingPriorityQueueSet
,RocksDBCachingPriorityQueueSet
,SourceCoordinator.WatermarkElement
,TimerHeapInternalTimer
@Internal public interface HeapPriorityQueueElement
Interface for objects that can be managed by aHeapPriorityQueue
. Such an object can only be contained in at most oneHeapPriorityQueue
at a time.
-
-
Field Summary
Fields Modifier and Type Field Description static int
NOT_CONTAINED
The index that indicates that aHeapPriorityQueueElement
object is not contained in and managed by anyHeapPriorityQueue
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getInternalIndex()
Returns the current index of this object in the internal array ofHeapPriorityQueue
.void
setInternalIndex(int newIndex)
Sets the current index of this object in theHeapPriorityQueue
and should only be called by the owningHeapPriorityQueue
.
-
-
-
Field Detail
-
NOT_CONTAINED
static final int NOT_CONTAINED
The index that indicates that aHeapPriorityQueueElement
object 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 theHeapPriorityQueue
and should only be called by the owningHeapPriorityQueue
.- Parameters:
newIndex
- the new index in the timer heap.
-
-