Class StatusWatermarkValve.InputChannelStatus

  • Enclosing class:
    StatusWatermarkValve

    @VisibleForTesting
    protected static class StatusWatermarkValve.InputChannelStatus
    extends Object
    An 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:

    • the current watermark status of the channel is idle
    • the watermark status has resumed to be active, but the watermark of the channel hasn't caught up to the last output watermark from the valve yet.

    NOTE: This class implements HeapPriorityQueue.HeapPriorityQueueElement to be managed by StatusWatermarkValve.alignedChannelStatuses to help find minimum watermark.

    • Field Detail

      • watermark

        protected long watermark
      • isWatermarkAligned

        protected boolean isWatermarkAligned
      • NOT_CONTAINED

        public static final int NOT_CONTAINED
        The index that indicates that a HeapPriorityQueue.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.
        See Also:
        Constant Field Values
    • Constructor Detail

      • InputChannelStatus

        protected InputChannelStatus()
    • Method Detail

      • getInternalIndex

        public int getInternalIndex()
      • setInternalIndex

        public void setInternalIndex​(int newIndex)