@VisibleForTesting protected static class StatusWatermarkValve.InputChannelStatus extends Object
InputChannelStatus
keeps track of an input channel's last watermark, stream
status, and whether or not the channel's current watermark is aligned with the overall
watermark output from the valve.
There are 2 situations where a channel's watermark is not considered aligned:
NOTE: This class implements HeapPriorityQueue.HeapPriorityQueueElement
to be managed by StatusWatermarkValve.alignedChannelStatuses
to help find minimum watermark.
Modifier and Type | Field and Description |
---|---|
protected boolean |
isWatermarkAligned |
static int |
NOT_CONTAINED
The index that indicates that a
HeapPriorityQueueElement object is not contained
in and managed by any HeapPriorityQueue . |
protected long |
watermark |
protected WatermarkStatus |
watermarkStatus |
Modifier | Constructor and Description |
---|---|
protected |
InputChannelStatus() |
Modifier and Type | Method and Description |
---|---|
int |
getInternalIndex()
Returns the current index of this object in the internal array of
HeapPriorityQueue . |
void |
setInternalIndex(int newIndex)
Sets the current index of this object in the
HeapPriorityQueue and should only be
called by the owning HeapPriorityQueue . |
protected long watermark
protected WatermarkStatus watermarkStatus
protected boolean isWatermarkAligned
public static final int NOT_CONTAINED
HeapPriorityQueueElement
object is not contained
in and managed by any HeapPriorityQueue
. We do not strictly enforce that internal
indexes must be reset to this value when elements are removed from a HeapPriorityQueue
.public int getInternalIndex()
HeapPriorityQueue
.public void setInternalIndex(int newIndex)
HeapPriorityQueue
and should only be
called by the owning HeapPriorityQueue
.newIndex
- the new index in the timer heap.Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.